@Override public boolean classStart(Clazz clazz) { this.clazz = clazz; this.name = clazz.getClassName(); return true; }
@Override public boolean classStart(Clazz clazz) { this.clazz = clazz; this.name = clazz.getClassName(); return true; }
public TypeRef getContainingClass() { return getClassName(); }
public TypeRef getContainingClass() { return getClassName(); }
public TypeRef getContainingClass() { return getClassName(); }
public TypeRef getContainingClass() { return getClassName(); }
public TypeRef getContainingClass() { return getClassName(); }
/** * Return the classes for a given source package. * * @param source the source package * @return a set of classes for the requested package. */ public Set<Clazz> getClassspace(PackageRef source) { Set<Clazz> result = new HashSet<>(); for (Clazz c : getClassspace().values()) { if (c.getClassName() .getPackageRef() == source) result.add(c); } return result; }
/** * Return the classes for a given source package. * * @param source * the source package * @return a set of classes for the requested package. */ public Set<Clazz> getClassspace(PackageRef source) { Set<Clazz> result = new HashSet<Clazz>(); for (Clazz c : getClassspace().values()) { if (c.getClassName().getPackageRef() == source) result.add(c); } return result; }
/** * Return the classes for a given source package. * * @param source * the source package * @return a set of classes for the requested package. */ public Set<Clazz> getClassspace(PackageRef source) { Set<Clazz> result = new HashSet<Clazz>(); for (Clazz c : getClassspace().values()) { if (c.getClassName().getPackageRef() == source) result.add(c); } return result; }
/** * Return the classes for a given source package. * * @param source * the source package * @return a set of classes for the requested package. */ public Set<Clazz> getClassspace(PackageRef source) { Set<Clazz> result = new HashSet<Clazz>(); for (Clazz c : getClassspace().values()) { if (c.getClassName().getPackageRef() == source) result.add(c); } return result; }
/** * Return the classes for a given source package. * * @param source the source package * @return a set of classes for the requested package. */ public Set<Clazz> getClassspace(PackageRef source) { Set<Clazz> result = new HashSet<>(); for (Clazz c : getClassspace().values()) { if (c.getClassName() .getPackageRef() == source) result.add(c); } return result; }
void doComponent(Annotation a, Component c) { pids = a.containsKey("configurationPid") ? c.configurationPid() : null; if (pids != null) { pid = pids[0]; } if (pids == null || "$".equals(pid)) { pid = a.containsKey("name") ? c.name() : clazz.getClassName() .getFQN(); } }
void doComponent(Annotation a, Component c) { pids = a.containsKey("configurationPid") ? c.configurationPid() : null; if (pids != null) { pid = pids[0]; } if (pids == null || "$".equals(pid)) { pid = a.containsKey("name") ? c.name() : clazz.getClassName() .getFQN(); } }
private void parseAndMergeInheritedMetadata(TypeRef ref, Clazz child) throws Exception { if (ref.isJava()) return; Clazz ec = reporter.findClass(ref); if (ec == null) { reporter.error("Missing inherited class for Metatype annotations: " + ref + " from " + child.getClassName()); } else { MetaTypeReader mtr = new MetaTypeReader(ec, reporter); mtr.setDesignate(designatePid, factory); mtr.finish(); for (Map.Entry<MethodDef,Meta.AD> entry : mtr.methods.entrySet()) addMethod(entry.getKey(), entry.getValue()); handleInheritedClasses(ec); } }
private void parseAndMergeInheritedMetadata(TypeRef ref, Clazz child) throws Exception { if (ref.isJava()) return; Clazz ec = reporter.findClass(ref); if (ec == null) { reporter.error("Missing inherited class for Metatype annotations: %s from %s", ref, child.getClassName()); } else { @SuppressWarnings("resource") MetaTypeReader mtr = new MetaTypeReader(ec, reporter); mtr.setDesignate(designatePid, factory); mtr.finish(); for (Map.Entry<MethodDef, Annotation> entry : mtr.methods.entrySet()) addMethod(entry.getKey(), entry.getValue()); handleInheritedClasses(ec); } }
private void parseAndMergeInheritedMetadata(TypeRef ref, Clazz child) throws Exception { if (ref.isJava()) return; Clazz ec = reporter.findClass(ref); if (ec == null) { reporter.error("Missing inherited class for Metatype annotations: " + ref + " from " + child.getClassName()); } else { MetaTypeReader mtr = new MetaTypeReader(ec, reporter); mtr.setDesignate(designatePid, factory); mtr.finish(); for (Map.Entry<MethodDef,Meta.AD> entry : mtr.methods.entrySet()) addMethod(entry.getKey(), entry.getValue()); handleInheritedClasses(ec); } }
private void parseAndMergeInheritedMetadata(TypeRef ref, Clazz child) throws Exception { if (ref.isJava()) return; Clazz ec = reporter.findClass(ref); if (ec == null) { reporter.error("Missing inherited class for Metatype annotations: %s from %s", ref, child.getClassName()); } else { @SuppressWarnings("resource") MetaTypeReader mtr = new MetaTypeReader(ec, reporter); mtr.setDesignate(designatePid, factory); mtr.finish(); for (Map.Entry<MethodDef, Annotation> entry : mtr.methods.entrySet()) addMethod(entry.getKey(), entry.getValue()); handleInheritedClasses(ec); } }
private ComponentDef getDef() throws Exception { clazz.parseClassFileWithCollector(this); if (component.implementation == null) return null; if (inherit) { baseclass = false; while (extendsClass != null) { if (extendsClass.isJava()) break; Clazz ec = analyzer.findClass(extendsClass); if (ec == null) { analyzer.error("Missing super class for DS annotations: " + extendsClass + " from " + clazz.getClassName()); } else { ec.parseClassFileWithCollector(this); } } } for (ReferenceDef rdef : component.references.values()) { rdef.unbind = referredMethod(analyzer, rdef, rdef.unbind, "add(.*)", "remove$1", "(.*)", "un$1"); rdef.updated = referredMethod(analyzer, rdef, rdef.updated, "(add|set|bind)(.*)", "updated$2", "(.*)", "updated$1"); } return component; }
public void annotation(Annotation annotation) throws Exception { TypeRef name = annotation.getName(); if (interesting.contains(name)) { if (name == bundleLicenseRef) doLicense(annotation.getAnnotation(BundleLicense.class)); else if (name == requireCapabilityRef) doRequireCapability(annotation.getAnnotation(RequireCapability.class)); else if (name == provideCapabilityRef) doProvideCapability(annotation.getAnnotation(ProvideCapability.class)); else if (name == bundleCategoryRef) doBundleCategory(annotation.getAnnotation(BundleCategory.class)); else if (name == bundleDocURLRef) doBundleDocURL(annotation.getAnnotation(BundleDocURL.class)); else if (name == bundleDeveloperRef) doBundleDevelopers(annotation.getAnnotation(BundleDevelopers.class)); else if (name == bundleContributorRef) doBundleContributors(annotation.getAnnotation(BundleContributors.class)); else if (name == bundleCopyrightRef) doBundeCopyright(annotation.getAnnotation(BundleCopyright.class)); else analyzer.error("Unknon annotation %s on %s", name, current.getClassName()); } }