public String getName() { if (value!=null) return value.getName(); return name; }
@Override public Collection<URI> getDefiningURIs() { return cur.getDefiningURIs(); }
for (AnnotatedElement ae : at.allAnnotatedTypes()) { Type t = (ae instanceof Member?((Member) ae).getDeclaringType():(Type) ae); if (t.wasDefinedIn(scannedURI)) { toBeRemoved.add(t.getName());
if (checkPath) { Type t = (element instanceof Member?((Member) element).getDeclaringType():(Type) element); if (t.wasDefinedIn(uris)) { result.add(sniffer); break;
List<ScannedAnnotation> classesWithThisAnnotation = null; for (final Type cur : allTypes) { annotations = cur.getAnnotations(); ScannedAnnotation toAdd = null; for (AnnotationModel curAnnotation : annotations) {
if (t.wasDefinedIn(scannedURI)) { if (shouldLog) { logger.log(logLevel, "Adding " + t.getName() + " since " + ae.getName() + " is annotated with " + at.getName()); entries.add(t.getName());
for (AnnotatedElement element : elements) { Type t = (element instanceof Member?((Member) element).getDeclaringType():(Type) element); if (t.wasDefinedIn(uris)) { return true;
if (t.wasDefinedIn(scannedURI)) { if (shouldLog) { if (Level.INFO.equals(logLevel)) { deplLogger.log(Level.INFO, ANNOTATION_ADDED, new Object[] { t.getName(), ae.getName(), at.getName() }); } else { deplLogger.log(Level.FINE, "Adding " + t.getName() + " since " + ae.getName() + " is annotated with " + at.getName()); entries.add(t.getName());
@Override public String getFullyQualifiedClassName() { return cur.getName(); }
/** * Given the set of annotations that comprise Hk2, as well as the provided classpath / files to * introspect, return the set of URIs that actually reference something of "significant value" * pertaining to habitat creation. */ private Set<URI> getSignificantURIReferences() { LinkedHashSet<URI> result = new LinkedHashSet<URI>(); Types types = context.getTypes(); for (String annotation : context.getConfig().getTypesOfInterest()) { AnnotationType atype = (AnnotationType) types.getBy(annotation); if (null != atype) { Collection<AnnotatedElement> coll = atype.allAnnotatedTypes(); for (AnnotatedElement ae : coll) { Type type = types.getBy(ae.getName()); if (null != type) { for (URI uri : type.getDefiningURIs()) { try { result.add(new File(uri).getCanonicalFile().toURI()); } catch (IOException e) { throw new RuntimeException(e); } } } } } } return Collections.unmodifiableSet(result); }
for (AnnotatedElement element : elements) { Type t = (element instanceof Member?((Member) element).getDeclaringType():(Type) element); if (t.wasDefinedIn(uris)) { return true;
public String getName() { if (value!=null) return value.getName(); return name; }
/** * Given the set of annotations that comprise Hk2, as well as the provided classpath / files to * introspect, return the set of URIs that actually reference something of "significant value" * pertaining to habitat creation. */ private Set<URI> getSignificantURIReferences() { LinkedHashSet<URI> result = new LinkedHashSet<URI>(); Types types = context.getTypes(); for (String annotation : context.getConfig().getTypesOfInterest()) { AnnotationType atype = (AnnotationType) types.getBy(annotation); if (null != atype) { Collection<AnnotatedElement> coll = atype.allAnnotatedTypes(); for (AnnotatedElement ae : coll) { Type type = types.getBy(ae.getName()); if (null != type) { for (URI uri : type.getDefiningURIs()) { try { result.add(new File(uri).getCanonicalFile().toURI()); } catch (IOException e) { throw new RuntimeException(e); } } } } } } return Collections.unmodifiableSet(result); }
@Override public boolean equals(Object obj) { boolean result = false; if (obj instanceof ScannedAnnotation) { String otherName = ((ScannedAnnotation)obj).getFullyQualifiedClassName(); if (null != otherName) { result = cur.getName().equals(otherName); } } return result; }