function Clazz() {}; Clazz.staticMethod = function() { alert('STATIC!!!'); }; Clazz.prototype.func = function() { this.constructor.staticMethod(); } var obj = new Clazz(); obj.func(); // <- Alert's "STATIC!!!"
Builder alert = new AlertDialog.Builder(screen4.this); alert.setTitle("Doctor"); alert.setMessage("message"); alert.setPositiveButton("OK",null); alert.show();
Form form = new Form(); form.add("x", "foo"); form.add("y", "bar"); Client client = ClientBuilder.newClient(); WebTarget resource = client.target("http://localhost:8080/someresource"); Builder request = resource.request(); request.accept(MediaType.APPLICATION_JSON); Response response = request.get(); if (response.getStatusInfo().getFamily() == Family.SUCCESSFUL) { System.out.println("Success! " + response.getStatus()); System.out.println(response.getEntity()); } else { System.out.println("ERROR! " + response.getStatus()); System.out.println(response.getEntity()); }
/** * @param p * @param pack */ private boolean isDynamicImport(PackageRef pack) { if (dynamicImports == null) dynamicImports = new Instructions(main.getDynamicImportPackage()); if (dynamicImports.isEmpty()) return false; return dynamicImports.matches(pack.getFQN()); }
public Verifier(Analyzer analyzer) throws Exception { super(analyzer); this.analyzer = analyzer; this.dot = analyzer.getJar(); this.manifest = dot.getManifest(); this.main = Domain.domain(manifest); }
@Override protected void begin() { if (inited == false) { inited = true; super.begin(); updateModified(getBndLastModified(), "bnd last modified"); verifyManifestHeadersCase(getProperties()); } }
@SuppressWarnings("resource") public static Jar fromResource(String name, Resource resource) throws Exception { if (resource instanceof JarResource) { return ((JarResource) resource).getJar(); } else if (resource instanceof FileResource) { return new Jar(name, ((FileResource) resource).getFile()); } return new Jar(name).buildFromResource(resource); }
@SuppressWarnings("resource") private String getProperty(String key, String deflt, String separator, boolean inherit) { Instruction ins = new Instruction(key); if (ins.isLiteral()) { return getLiteralProperty(ins.getLiteral(), deflt, this, inherit); } return getWildcardProperty(deflt, separator, inherit, ins); }
private MethodSignature getMethodSignature(MethodDef method) { String signature = method.getSignature(); return analyzer.getMethodSignature((signature != null) ? signature : method.getDescriptor() .toString()); }
public PreprocessResource(Processor processor, Resource r) { super(r.lastModified()); this.processor = processor; this.resource = r; setExtra(resource.getExtra()); }
new Analyzer() { public TokenStream tokenStream(String fieldName, Reader reader) {
public Macro getReplacer() { if (replacer == null) return replacer = new Macro(this, getMacroDomains()); return replacer; }
/** * Return the properties but expand all macros. This always returns a new * Properties object that can be used in any way. */ public Properties getFlattenedProperties(boolean ignoreInstructions) { return getReplacer().getFlattenedProperties(ignoreInstructions); }
/** * @param p * @param pack */ private boolean isDynamicImport(PackageRef pack) { if (dynamicImports == null) dynamicImports = new Instructions(main.getDynamicImportPackage()); return dynamicImports.matches(pack.getFQN()); }
public Verifier(Analyzer analyzer) throws Exception { this.analyzer = analyzer; this.dot = analyzer.getJar(); this.manifest = dot.getManifest(); this.main = Domain.domain(manifest); }