|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.reflections.Store
public class Store
stores metadata information in multimaps
use the different query methods (getXXX) to query the metadata
the query methods are string based, and does not cause the class loader to define the types
use Reflections.getStore()
to access this store
Constructor Summary | |
---|---|
Store()
|
Method Summary | |
---|---|
com.google.common.collect.Multimap<java.lang.String,java.lang.String> |
get(java.lang.Class<? extends Scanner> scannerClass)
return the multimap store of the given scanner class. |
java.util.Set<java.lang.String> |
get(java.lang.Class<? extends Scanner> scannerClass,
java.lang.String... keys)
get the values of given keys stored for the given scanner class |
java.util.Set<java.lang.String> |
getConverters(java.lang.String from,
java.lang.String to)
get 'converter' methods that could effectively convert from type 'from' to type 'to' |
java.util.Set<java.lang.String> |
getFieldsAnnotatedWith(java.lang.String annotation)
get fields annotated with a given annotation |
java.lang.Integer |
getKeysCount()
return the keys count |
java.util.Set<java.lang.String> |
getMethodsAnnotatedWith(java.lang.String annotation)
get method names annotated with a given annotation |
java.util.Set<java.lang.String> |
getResources(java.util.regex.Pattern pattern)
get resources relative paths where simple name (key) matches given regular expression |
java.util.Set<java.lang.String> |
getResources(com.google.common.base.Predicate<java.lang.String> namePredicate)
get resources relative paths where simple name (key) matches given namePredicate |
java.util.Set<java.lang.String> |
getResources(java.lang.String key)
get resources relative paths where simple name (key) equals given name |
java.util.Map<java.lang.String,com.google.common.collect.Multimap<java.lang.String,java.lang.String>> |
getStoreMap()
return the store map. |
java.util.Set<java.lang.String> |
getSubTypesOf(java.lang.String type)
get sub types of a given type |
com.google.common.collect.Multiset<java.lang.String> |
getSuperTypes()
get all super types that have stored sub types, based on the metadata stored by SubTypesScanner |
java.util.Set<java.lang.String> |
getTypeAnnotations()
get all annotations, based on metadata stored by TypeAnnotationsScanner |
java.util.Set<java.lang.String> |
getTypesAnnotatedWith(java.lang.String annotation)
get types annotated with a given annotation, both classes and annotations |
java.util.Set<java.lang.String> |
getTypesAnnotatedWith(java.lang.String annotation,
boolean honorInherited)
get types annotated with a given annotation, both classes and annotations |
java.lang.Integer |
getValuesCount()
return the values count |
boolean |
hasSubTypes(java.lang.String typeAnnotatedWith)
does the given type has sub types, based on the metadata stored by SubTypesScanner |
boolean |
isAnnotation(java.lang.String typeAnnotatedWith)
is the given type is an annotation, based on the metadata stored by TypeAnnotationsScanner |
boolean |
isClass(java.lang.String type)
is the given type name a class. |
boolean |
isInheritedAnnotation(java.lang.String typeAnnotatedWith)
is the given annotation an inherited annotation, based on the metadata stored by TypeAnnotationsScanner |
boolean |
isInterface(java.lang.String aClass)
is the given type name an interface. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Store()
Method Detail |
---|
public java.util.Set<java.lang.String> get(java.lang.Class<? extends Scanner> scannerClass, java.lang.String... keys)
public com.google.common.collect.Multimap<java.lang.String,java.lang.String> get(java.lang.Class<? extends Scanner> scannerClass)
public java.util.Map<java.lang.String,com.google.common.collect.Multimap<java.lang.String,java.lang.String>> getStoreMap()
public java.lang.Integer getKeysCount()
public java.lang.Integer getValuesCount()
public java.util.Set<java.lang.String> getSubTypesOf(java.lang.String type)
public java.util.Set<java.lang.String> getTypesAnnotatedWith(java.lang.String annotation)
Inherited
is honored
Note that this (@Inherited) meta-annotation type has no effect if the annotated type is used for anything other than a class. Also, this meta-annotation causes annotations to be inherited only from superclasses; annotations on implemented interfaces have no effect.
public java.util.Set<java.lang.String> getTypesAnnotatedWith(java.lang.String annotation, boolean honorInherited)
Inherited
is honored according to given honorInherited
Note that this (@Inherited) meta-annotation type has no effect if the annotated type is used for anything other than a class. Also, this meta-annotation causes annotations to be inherited only from superclasses; annotations on implemented interfaces have no effect.
public java.util.Set<java.lang.String> getMethodsAnnotatedWith(java.lang.String annotation)
public java.util.Set<java.lang.String> getFieldsAnnotatedWith(java.lang.String annotation)
public java.util.Set<java.lang.String> getConverters(java.lang.String from, java.lang.String to)
public java.util.Set<java.lang.String> getResources(java.lang.String key)
public java.util.Set<java.lang.String> getResources(com.google.common.base.Predicate<java.lang.String> namePredicate)
public java.util.Set<java.lang.String> getResources(java.util.regex.Pattern pattern)
Set<String> xmls = reflections.getResources(".\*\.xml");
public boolean isClass(java.lang.String type)
causes class loading
public boolean isInterface(java.lang.String aClass)
causes class loading
public boolean isAnnotation(java.lang.String typeAnnotatedWith)
public boolean isInheritedAnnotation(java.lang.String typeAnnotatedWith)
public boolean hasSubTypes(java.lang.String typeAnnotatedWith)
public com.google.common.collect.Multiset<java.lang.String> getSuperTypes()
public java.util.Set<java.lang.String> getTypeAnnotations()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |