/** * Returns the path raw name. * * @return the raw name */ public String getRawName() { return name.getIdentifier(); }
/** * Returns the path raw name. * * @return the raw name */ public String getRawName() { return name.getIdentifier(); }
HandlerMetaModel( ElementHandle.Method method, String declaredId, Phase phase, String name, ArrayList<ParameterMetaModel> parameters) { String id; if (declaredId == null) { id = method.getTypeName().getIdentifier() + "." + method.getName(); } else { id = declaredId; } // this.method = method; this.declaredId = declaredId; this.phase = phase; this.name = name; this.parameters = parameters; this.id = id; }
HandlerMetaModel( ElementHandle.Method method, String declaredId, Phase phase, String name, ArrayList<ParameterMetaModel> parameters) { String id; if (declaredId == null) { id = method.getTypeName().getIdentifier() + "." + method.getName(); } else { id = declaredId; } // this.method = method; this.declaredId = declaredId; this.phase = phase; this.name = name; this.parameters = parameters; this.id = id; }
writer.append("public class ").append(fqn.getIdentifier()).append(" {\n"); writer.append("public ").append(fqn.getIdentifier()).append("() throws Exception {\n"); writer.append("this.descriptor = ").append(APPLICATION_DESCRIPTOR).append(".create(getClass());\n"); writer.append("}\n");
public GroovyTemplateEmitter(Name name) { if (name != null) { pkg = name.getParent(); String id = "C" + name.getIdentifier(); constants = pkg.append(id); } else { pkg = null; constants = Name.parse("Constants"); } }
writer.append("public class ").append(fqn.getIdentifier()).append(" {\n"); writer.append("public ").append(fqn.getIdentifier()).append("() throws Exception {\n"); writer.append("this.descriptor = ").append(APPLICATION_DESCRIPTOR).append(".create(getClass());\n"); writer.append("}\n");
builder.append("public class ").append(constants.getIdentifier()).append(sep); builder.append("{").append(sep);
builder.append("public class ").append(constants.getIdentifier()).append(sep); builder.append("{").append(sep);
public GroovyTemplateEmitter(Name name) { if (name != null) { pkg = name.getParent(); String id = "C" + name.getIdentifier(); constants = pkg.append(id); } else { pkg = null; constants = Name.parse("Constants"); } }
writer.append("public class ").append(fqn.getIdentifier()).append("_ {\n");
writer.append("public class ").append(fqn.getIdentifier()).append("_ {\n");
/** * Returns the URL for servlet unit test and the specified path. * * @return the base servlet URL */ public URL getServletURL(String path) { // Remove any leading / if (path.startsWith("/")) { path = path.substring(1); } // URI base; try { URI uri = deploymentURL.toURI(); // uri = uri.resolve(AbstractWebTestCase.path); // if (asDefault) { base = uri; } else { base = uri.resolve(getApplicationName().getIdentifier()); } base = base.resolve(path); return base.toURL(); } catch (Exception e) { throw failure("Could not build application url " + path, e); } }
/** * Returns the URL for servlet unit test and the specified path. * * @return the base servlet URL */ public URL getServletURL(String path) { // Remove any leading / if (path.startsWith("/")) { path = path.substring(1); } // URI base; try { URI uri = deploymentURL.toURI(); // uri = uri.resolve(AbstractWebTestCase.path); // if (asDefault) { base = uri; } else { base = uri.resolve(getApplicationName().getIdentifier()); } base = base.resolve(path); return base.toURL(); } catch (Exception e) { throw failure("Could not build application url " + path, e); } }
@Override public void processAnnotationAdded(ApplicationMetaModel metaModel, AnnotationKey key, AnnotationState added) { if (metaModel.getHandle().equals(key.getElement())) { AssetsMetaModel assetsMetaModel = metaModel.getChild(AssetsMetaModel.KEY); Integer maxAge = (Integer)added.get("maxAge"); String type; String identifier = key.getType().getIdentifier(); if (identifier.equals(Scripts.class.getSimpleName())) { type = "script"; } else { type = "stylesheet"; } List<ElementHandle.Type> minifiers = (List<ElementHandle.Type>)added.get("minifier"); for (Asset asset : getAssets(type, added, maxAge, minifiers)) { assetsMetaModel.addAsset(asset); } } }
@Override public void processAnnotationAdded(ApplicationMetaModel metaModel, AnnotationKey key, AnnotationState added) { if (metaModel.getHandle().equals(key.getElement())) { AssetsMetaModel assetsMetaModel = metaModel.getChild(AssetsMetaModel.KEY); Integer maxAge = (Integer)added.get("maxAge"); String type; String identifier = key.getType().getIdentifier(); if (identifier.equals(Scripts.class.getSimpleName())) { type = "script"; } else { type = "stylesheet"; } List<ElementHandle.Type> minifiers = (List<ElementHandle.Type>)added.get("minifier"); for (Asset asset : getAssets(type, added, maxAge, minifiers)) { assetsMetaModel.addAsset(asset); } } }
public JavaFile<I> assertAddJavaSource(String name) { Name n = Name.parse(name); FileResource<I> source = assertAddSource(name, "java", "package " + n.getParent() + ";\npublic class " + n.getIdentifier() + " {}\n"); return new JavaFile<I>(source); }
public JavaFile<I> assertAddJavaSource(String name) { Name n = Name.parse(name); FileResource<I> source = assertAddSource(name, "java", "package " + n.getParent() + ";\npublic class " + n.getIdentifier() + " {}\n"); return new JavaFile<I>(source); }