Package com.gengoai.reflection
Class ClassDescriptor
- java.lang.Object
-
- com.gengoai.reflection.ClassDescriptor
-
- All Implemented Interfaces:
Serializable
public final class ClassDescriptor extends Object implements Serializable
Contains basic information about the methods, fields and constructors for a class.- Author:
- David B. Bracewell
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClassDescriptor(Class<?> clazz)
Instantiates a new Class descriptor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Iterator<Reflect>
getAncestors(boolean reversed)
Class<?>
getClazz()
Gets clazz.Stream<Constructor<?>>
getConstructors(boolean privileged)
Gets constructors.Field
getField(String name, boolean privileged)
Gets field.Stream<Field>
getFields(boolean privileged)
Gets fields.Stream<Method>
getMethods(boolean privileged)
Gets methods.Stream<Method>
getMethods(String[] names, boolean privileged)
Gets methods.Stream<Method>
getMethods(String name, boolean privileged)
Gets methods.Method
getSingletonMethod()
int
hashCode()
-
-
-
Constructor Detail
-
ClassDescriptor
public ClassDescriptor(Class<?> clazz)
Instantiates a new Class descriptor.- Parameters:
clazz
- the clazz
-
-
Method Detail
-
getClazz
public Class<?> getClazz()
Gets clazz.- Returns:
- the clazz
-
getConstructors
public Stream<Constructor<?>> getConstructors(boolean privileged)
Gets constructors.- Parameters:
privileged
- the privileged- Returns:
- the constructors
-
getField
public Field getField(String name, boolean privileged)
Gets field.- Parameters:
name
- the nameprivileged
- the privileged- Returns:
- the field
-
getFields
public Stream<Field> getFields(boolean privileged)
Gets fields.- Parameters:
privileged
- the privileged- Returns:
- the fields
-
getMethods
public Stream<Method> getMethods(boolean privileged)
Gets methods.- Parameters:
privileged
- the privileged- Returns:
- the methods
-
getMethods
public Stream<Method> getMethods(String[] names, boolean privileged)
Gets methods.- Parameters:
privileged
- the privileged- Returns:
- the methods
-
getMethods
public Stream<Method> getMethods(String name, boolean privileged)
Gets methods.- Parameters:
name
- the nameprivileged
- the privileged- Returns:
- the methods
-
getSingletonMethod
public Method getSingletonMethod()
-
-