public class ClassInfo extends Object
| Constructor and Description |
|---|
ClassInfo(InputStream inputStream) |
ClassInfo(String name,
ClassInfo subclass)
This class was referenced as a superclass of the given subclass.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSubclass(ClassInfo subclass)
Connect this class to a subclass.
|
Collection<AnnotationInfo> |
annotations() |
AnnotationsInfo |
annotationsInfo() |
Set<FieldInfo> |
candidateRelationshipFields(String relationshipName,
String relationshipDirection,
boolean strict)
Finds all relationship fields with a specific name and direction from the ClassInfo's relationship fields
|
Set<MethodInfo> |
candidateRelationshipSetters(String relationshipName,
String relationshipDirection,
boolean strict)
Finds all relationship setters with a specific name and direction from the specified ClassInfo's relationship setters.
|
List<ClassInfo> |
directImplementingClasses() |
List<ClassInfo> |
directInterfaces() |
List<ClassInfo> |
directSubclasses() |
FieldsInfo |
fieldsInfo() |
List<FieldInfo> |
findFields(Class<?> fieldType)
Find all FieldInfos for the specified ClassInfo whose type matches the supplied fieldType
|
List<FieldInfo> |
findFields(String annotation)
Find all FieldInfos for the specified ClassInfo which have the specified annotation
|
List<MethodInfo> |
findGetters(Class<?> returnType)
Find all getter MethodInfos for the specified ClassInfo whose return type matches the supplied class
|
List<FieldInfo> |
findIterableFields()
|
List<FieldInfo> |
findIterableFields(Class iteratedType)
Finds all fields whose type is equivalent to Array<X> or assignable from Iterable<X>
where X is the generic parameter type of the Array or Iterable
|
List<FieldInfo> |
findIterableFields(Class iteratedType,
String relationshipType,
String relationshipDirection,
boolean strict)
Finds all fields whose type is equivalent to Array<X> or assignable from Iterable<X>
where X is the generic parameter type of the Array or Iterable and the relationship type backing this iterable is "relationshipType"
|
List<MethodInfo> |
findIterableGetters(Class iteratedType)
Finds all getter methods whose parameterised return type is equivalent to Array<X> or assignable from Iterable<X>
where X is the generic parameter type of the Array or Iterable
|
List<MethodInfo> |
findIterableGetters(Class iteratedType,
String relationshipType,
String relationshipDirection,
boolean strict)
Finds all getter methods whose parameterised return type is equivalent to Array<X> or assignable from Iterable<X>
where X is the generic parameter type of the Array or Iterable and the relationship type this getter is annotated with is "relationshipType"
and the direction of the relationship is "relationshipDirection"
|
List<MethodInfo> |
findIterableSetters(Class iteratedType)
Finds all setter methods whose parameter signature is equivalent to Array<X> or assignable from Iterable<X>
where X is the generic parameter type of the Array or Iterable
|
List<MethodInfo> |
findIterableSetters(Class iteratedType,
String relationshipType,
String relationshipDirection,
boolean strict)
Finds all setter methods whose parameter signature is equivalent to Array<X> or assignable from Iterable<X>
where X is the generic parameter type of the Array or Iterable and the relationship type this setter is annotated with is "relationshipType"
and the relationship direction matches "relationshipDirection"
|
List<MethodInfo> |
findSetters(Class<?> parameterType)
Find all setter MethodInfos for the specified ClassInfo whose parameter type matches the supplied class
|
Field |
getField(FieldInfo fieldInfo) |
Method |
getMethod(MethodInfo methodInfo,
Class... parameterTypes) |
Class<?> |
getType(String typeParameterDescriptor) |
Class |
getTypeParameterDescriptorForRelationship(String relationshipType,
String relationshipDirection)
Gets the class of the type parameter description of the entity related to this.
|
Class |
getUnderlyingClass()
Get the underlying class represented by this ClassInfo
|
void |
hydrate(ClassInfo classInfoDetails)
A class that was previously only seen as a temp superclass of another class can now be fully hydrated.
|
boolean |
hydrated() |
FieldInfo |
identityField()
The identity field is a field annotated with @NodeId, or if none exists, a field
of type Long called 'id'
|
MethodInfo |
identityGetter()
The identity getter is any getter annotated with @NodeId returning a Long, or if none exists, a getter
returning Long called 'getId'
|
MethodInfo |
identitySetter()
The identity setter is any setter annotated with @NodeId taking a Long parameter, or if none exists, a setter
called 'setId' taking a Long parameter
|
InterfacesInfo |
interfacesInfo() |
boolean |
isAbstract() |
boolean |
isEnum() |
boolean |
isInterface() |
boolean |
isSubclassOf(ClassInfo classInfo)
Returns true if this classInfo is in the subclass hierarchy of b, or if this classInfo is the same as b, false otherwise
|
boolean |
isTransient() |
Collection<String> |
labels()
Retrieves the labels that are applied to nodes in the database that store information about instances of the class.
|
MethodsInfo |
methodsInfo() |
String |
name() |
String |
neo4jName() |
FieldInfo |
propertyField(String propertyName)
Finds the property field with a specific property name from the ClassInfo's property fields
|
FieldInfo |
propertyFieldByName(String propertyName)
Finds the property field with a specific field name from the ClassInfo's property fields
|
Collection<FieldInfo> |
propertyFields()
A property field is any field annotated with @Property, or any field that can be mapped to a
node property.
|
MethodInfo |
propertyGetter(String propertyName)
Finds the property getter with a specific name from the specified ClassInfo's property getters
|
Collection<MethodInfo> |
propertyGetters()
A property getter is any getter annotated with @Property, or any getter whose return type can be mapped to a
node property.
|
MethodInfo |
propertySetter(String propertyName)
Finds the property setter with a specific name from the specified ClassInfo's property setters
|
Collection<MethodInfo> |
propertySetters()
A property setter is any setter annotated with @Property, or any setter whose parameter type can be mapped to a
node property.
|
FieldInfo |
relationshipField(String relationshipName)
Finds the relationship field with a specific name from the ClassInfo's relationship fields
|
FieldInfo |
relationshipField(String relationshipName,
String relationshipDirection,
boolean strict)
Finds the relationship field with a specific name and direction from the ClassInfo's relationship fields
|
FieldInfo |
relationshipFieldByName(String fieldName)
Finds the relationship field with a specific property name from the ClassInfo's relationship fields
|
Collection<FieldInfo> |
relationshipFields()
A relationship field is any field annotated with @Relationship, or any field that cannot be mapped to a
node property.
|
MethodInfo |
relationshipGetter(String relationshipName)
Finds the relationship getter with a specific name from the specified ClassInfo's relationship getters
|
MethodInfo |
relationshipGetter(String relationshipName,
String relationshipDirection,
boolean strict)
Finds the relationship getter with a specific name and direction from the specified ClassInfo's relationship getters
|
Collection<MethodInfo> |
relationshipGetters()
A relationship getter is any getter annotated with @Relationship, or any getter whose return type cannot be mapped to a
node property.
|
MethodInfo |
relationshipSetter(String relationshipName)
Finds the relationship setter with a specific name from the specified ClassInfo's relationship setters
|
MethodInfo |
relationshipSetter(String relationshipName,
String relationshipDirection,
boolean strict)
Finds the relationship setter with a specific name and direction from the specified ClassInfo's relationship setters.
|
Collection<MethodInfo> |
relationshipSetters()
A relationship setter is any setter annotated with @Relationship, or any setter whose parameter type cannot be mapped to a
node property.
|
String |
superclassName() |
String |
toString() |
public ClassInfo(InputStream inputStream) throws IOException
IOExceptionpublic void hydrate(ClassInfo classInfoDetails)
classInfoDetails - ClassInfo detailspublic void addSubclass(ClassInfo subclass)
subclass - the subclasspublic boolean hydrated()
public String name()
public Collection<String> labels()
Collection of all the labels that apply to the node or an empty list if there aren't any, never
nullpublic String neo4jName()
public InterfacesInfo interfacesInfo()
public Collection<AnnotationInfo> annotations()
public boolean isInterface()
public boolean isEnum()
public AnnotationsInfo annotationsInfo()
public String superclassName()
public FieldsInfo fieldsInfo()
public MethodsInfo methodsInfo()
public FieldInfo identityField()
FieldInfo object representing the identity field never nullMappingException - if no identity field can be foundpublic Collection<FieldInfo> propertyFields()
public FieldInfo propertyField(String propertyName)
propertyName - the propertyName of the field to findpublic FieldInfo propertyFieldByName(String propertyName)
propertyName - the propertyName of the field to findpublic Collection<FieldInfo> relationshipFields()
public FieldInfo relationshipField(String relationshipName)
relationshipName - the relationshipName of the field to findpublic FieldInfo relationshipField(String relationshipName, String relationshipDirection, boolean strict)
relationshipName - the relationshipName of the field to findrelationshipDirection - the direction of the relationshipstrict - if true, does not infer relationship type but looks for it in the @Relationship annotation. Null if missing. If false, infers relationship type from FieldInfopublic Set<FieldInfo> candidateRelationshipFields(String relationshipName, String relationshipDirection, boolean strict)
relationshipName - the relationshipName of the field to findrelationshipDirection - the direction of the relationshipstrict - if true, does not infer relationship type but looks for it in the @Relationship annotation. Null if missing. If false, infers relationship type from FieldInfopublic FieldInfo relationshipFieldByName(String fieldName)
fieldName - the name of the fieldpublic MethodInfo identityGetter()
public MethodInfo identitySetter()
public Collection<MethodInfo> propertyGetters()
public Collection<MethodInfo> propertySetters()
public Collection<MethodInfo> relationshipGetters()
public Collection<MethodInfo> relationshipSetters()
public MethodInfo relationshipGetter(String relationshipName)
relationshipName - the relationshipName of the getter to findpublic MethodInfo relationshipGetter(String relationshipName, String relationshipDirection, boolean strict)
relationshipName - the relationshipName of the getter to findrelationshipDirection - the relationship directionstrict - if true, does not infer relationship type but looks for it in the @Relationship annotation. Null if missing. If false, infers relationship type from MethodInfopublic MethodInfo relationshipSetter(String relationshipName)
relationshipName - the relationshipName of the setter to findpublic MethodInfo relationshipSetter(String relationshipName, String relationshipDirection, boolean strict)
relationshipName - the relationshipName of the setter to findrelationshipDirection - the relationship directionstrict - if true, does not infer relationship type but looks for it in the @Relationship annotation. Null if missing. If false, infers relationship type from MethodInfopublic Set<MethodInfo> candidateRelationshipSetters(String relationshipName, String relationshipDirection, boolean strict)
relationshipName - the relationshipName of the setter to findrelationshipDirection - the relationship directionstrict - if true, does not infer relationship type but looks for it in the @Relationship annotation. Null if missing. If false, infers relationship type from MethodInfopublic MethodInfo propertySetter(String propertyName)
propertyName - the propertyName of the setter to findpublic MethodInfo propertyGetter(String propertyName)
propertyName - the propertyName of the getter to findpublic Method getMethod(MethodInfo methodInfo, Class... parameterTypes)
public List<MethodInfo> findSetters(Class<?> parameterType)
parameterType - The setter parameter type to look for.List of MethodInfo objects that accept the given parameter type, never nullpublic List<MethodInfo> findGetters(Class<?> returnType)
returnType - The getter return type to look for.List of MethodInfo objects that return the given type, never nullpublic List<FieldInfo> findFields(Class<?> fieldType)
public List<FieldInfo> findFields(String annotation)
public List<FieldInfo> findIterableFields(Class iteratedType)
iteratedType - the type of iterableList of MethodInfo, never nullpublic List<FieldInfo> findIterableFields(Class iteratedType, String relationshipType, String relationshipDirection, boolean strict)
iteratedType - the type of iterablerelationshipType - the relationship typerelationshipDirection - the relationship directionstrict - if true, does not infer relationship type but looks for it in the @Relationship annotation. Null if missing. If false, infers relationship type from FieldInfoList of MethodInfo, never nullpublic List<MethodInfo> findIterableSetters(Class iteratedType)
iteratedType - the type of iterableList of MethodInfo, never nullpublic List<MethodInfo> findIterableSetters(Class iteratedType, String relationshipType, String relationshipDirection, boolean strict)
iteratedType - the type of iterablerelationshipType - the relationship typerelationshipDirection - the relationship directionstrict - if true, does not infer relationship type but looks for it in the @Relationship annotation. Null if missing. If false, infers relationship type from MethodInfoList of MethodInfo, never nullpublic List<MethodInfo> findIterableGetters(Class iteratedType)
iteratedType - the type of iterableList of MethodInfo, never nullpublic List<MethodInfo> findIterableGetters(Class iteratedType, String relationshipType, String relationshipDirection, boolean strict)
iteratedType - the type of iterablerelationshipType - the relationship typerelationshipDirection - the relationshipDirectionstrict - if true, does not infer relationship type but looks for it in the @Relationship annotation. Null if missing. If false, infers relationship type from MethodInfoList of MethodInfo, never nullpublic boolean isTransient()
public boolean isAbstract()
public boolean isSubclassOf(ClassInfo classInfo)
classInfo - the classInfo at the toplevel of a type hierarchy to search throughpublic Class getUnderlyingClass()
public Class getTypeParameterDescriptorForRelationship(String relationshipType, String relationshipDirection)
relationshipType - the relationship typerelationshipDirection - the relationship directionCopyright © 2016 Neo Technology, Inc.. All rights reserved.