@Override public void method(Clazz.MethodDef method) { int access = method.getAccess(); if (Modifier.isAbstract(access) || Modifier.isStatic(access)) return; if (!baseclass && Modifier.isPrivate(access)) return; this.method = method; methods.add(method.getName(), method.getDescriptor().toString()); }
@Override public void method(Clazz.MethodDef method) { int access = method.getAccess(); if (Modifier.isAbstract(access) || Modifier.isStatic(access)) return; if (!baseclass && Modifier.isPrivate(access)) return; this.method = method; methods.add(method.getName(), method.getDescriptor().toString()); }
@Override public void method(Clazz.MethodDef method) { int access = method.getAccess(); if (Modifier.isAbstract(access) || Modifier.isStatic(access)) return; if (!baseclass && Modifier.isPrivate(access)) return; this.method = method; methods.add(method.getName(), method.getDescriptor().toString()); }
/** * see 112.3.2. We can't distinguish the bind type, so we just accept anything. * @param test * @return */ int rateBind(MethodDef test) { TypeRef[] prototype = test.getDescriptor().getPrototype(); if (prototype.length == 1 && ServiceReferenceTR.equals(prototype[0].getFQN())) return 1; if (prototype.length == 1) return 2; if (prototype.length == 2 && MapTR.equals(prototype[1].getFQN())) return 3; return 6; }
/** * Parses a method. Always invoked BEFORE eventual method annotation. */ @Override public void method(Clazz.MethodDef method) { m_logger.debug("Parsed method %s descriptor=%s signature=%s", method.getName(), method.getDescriptor(), method.getSignature()); m_isField = false; m_method = method.getName(); m_methodDef = method; m_descriptor = method.getDescriptor().toString(); m_methods.computeIfAbsent(method.getName(), k -> new ArrayList<Descriptors.Descriptor>()).add(method.getDescriptor()); }
public int compare(MethodDef a, MethodDef b) { int r = a.getName().compareTo(b.getName()); return r != 0 ? r : a.getDescriptor().toString() .compareTo(b.getDescriptor().toString()); } };
private static void method(PrintWriter out, String element, Clazz.MethodDef source, String closeElement) { out.println(" <" + element + " class='" + source.getContainingClass() .getFQN() + "'" + getAccess(source.getAccess()) + (source.isConstructor() ? "" : " name='" + source.getName() + "'") + " descriptor='" + source.getDescriptor() + "' pretty='" + source.toString() + "'" + closeElement); }
@Override public int compare(MethodDef a, MethodDef b) { int r = a.getName() .compareTo(b.getName()); return r != 0 ? r : a.getDescriptor() .toString() .compareTo(b.getDescriptor() .toString()); } };
private static void method(PrintWriter out, String element, Clazz.MethodDef source, String closeElement) { out.println(" <" + element + " class='" + source.getContainingClass().getFQN() + "'" + getAccess(source.getAccess()) + (source.isConstructor() ? "" : " name='" + source.getName() + "'") + " descriptor='" + source.getDescriptor() + "' pretty='" + source.toString() + "'" + closeElement); }
private MethodSignature getMethodSignature(MethodDef method) { String signature = method.getSignature(); return analyzer.getMethodSignature((signature != null) ? signature : method.getDescriptor() .toString()); }
private static void method(PrintWriter out, String element, Clazz.MethodDef source, String closeElement) { out.println(" <" + element + " class='" + source.getContainingClass().getFQN() + "'" + getAccess(source.getAccess()) + (source.isConstructor() ? "" : " name='" + source.getName() + "'") + " descriptor='" + source.getDescriptor() + "' pretty='" + source.toString() + "'" + closeElement); }
/** * */ protected void doDeactivate() { if (!LIFECYCLEDESCRIPTOR.matcher(method.getDescriptor().toString()).matches()) analyzer.error( "Deactivate method for %s does not have an acceptable prototype, only Map, ComponentContext, or BundleContext is allowed. Found: %s", clazz, method.getDescriptor()); else { component.deactivate = method.getName(); } }
private static void method(PrintWriter out, String element, Clazz.MethodDef source, String closeElement) { out.println(" <" + element + " class='" + source.getContainingClass().getFQN() + "'" + getAccess(source.getAccess()) + (source.isConstructor() ? "" : " name='" + source.getName() + "'") + " descriptor='" + source.getDescriptor() + "' pretty='" + source.toString() + "'" + closeElement); }
public int compare(MethodDef a, MethodDef b) { int r = a.getName().compareTo(b.getName()); return r != 0 ? r : a.getDescriptor().toString() .compareTo(b.getDescriptor().toString()); } };
private static void method(PrintWriter out, String element, Clazz.MethodDef source, String closeElement) { out.println(" <" + element + " class='" + source.getContainingClass() .getFQN() + "'" + getAccess(source.getAccess()) + (source.isConstructor() ? "" : " name='" + source.getName() + "'") + " descriptor='" + source.getDescriptor() + "' pretty='" + source.toString() + "'" + closeElement); }
@Override public int compare(MethodDef a, MethodDef b) { int r = a.getName() .compareTo(b.getName()); return r != 0 ? r : a.getDescriptor() .toString() .compareTo(b.getDescriptor() .toString()); } };
private MethodSignature getMethodSignature(MethodDef method) { String signature = method.getSignature(); return analyzer.getMethodSignature((signature != null) ? signature : method.getDescriptor() .toString()); }
public int compare(MethodDef a, MethodDef b) { int r = a.getName().compareTo(b.getName()); return r != 0 ? r : a.getDescriptor().toString() .compareTo(b.getDescriptor().toString()); } };
/** * */ protected void doModified() { if (!LIFECYCLEDESCRIPTOR.matcher(method.getDescriptor().toString()).matches()) analyzer.error( "Modified method for %s does not have an acceptable prototype, only Map, ComponentContext, or BundleContext is allowed. Found: %s", clazz, method.getDescriptor()); else { component.modified = method.getName(); } }
/** * */ protected void doActivate() { if (!LIFECYCLEDESCRIPTOR.matcher(method.getDescriptor().toString()).matches()) analyzer.error( "Activate method for %s does not have an acceptable prototype, only Map, ComponentContext, or BundleContext is allowed. Found: %s", clazz, method.getDescriptor()); else { component.activate = method.getName(); } }