public interface ClassAccess
| Modifier and Type | Method and Description |
|---|---|
<T extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<T> annotationClass)
Get an annotation of the class.
|
java.lang.Class<?> |
getClazz() |
default ConstructorAccess |
getConstructor(java.lang.Class<?>... parameterTypes)
Get a constructor with the given parameter types.
|
ConstructorAccess[] |
getConstructors() |
FieldAccess[] |
getFields() |
ClassAccess[] |
getInnerClasses() |
default MethodAccess |
getMethod(java.lang.String name,
java.lang.Class<?> returnType,
java.lang.Class<?>... parameterTypes)
Get a method with the given name and parameter types.
|
MethodAccess[] |
getMethods() |
default ConstructorAccess |
tryGetConstructor(java.lang.Class<?>... parameterTypes)
Try to get a constructor with the given parameter types.
|
default MethodAccess |
tryGetMethod(java.lang.String name,
java.lang.Class<?> returnType,
java.lang.Class<?>... parameterTypes)
Try to get a method with the given name and parameter types.
|
java.lang.Class<?> getClazz()
ConstructorAccess[] getConstructors()
Class.getDeclaredConstructors()default ConstructorAccess getConstructor(java.lang.Class<?>... parameterTypes)
parameterTypes - The parameter types of the constructorjava.lang.IllegalArgumentException - If no constructor with the given parameter types was found@Nullable default ConstructorAccess tryGetConstructor(java.lang.Class<?>... parameterTypes)
parameterTypes - The parameter types of the constructorFieldAccess[] getFields()
Class.getDeclaredFields()MethodAccess[] getMethods()
Class.getDeclaredMethods()default MethodAccess getMethod(java.lang.String name, java.lang.Class<?> returnType, java.lang.Class<?>... parameterTypes)
name - The name of the methodreturnType - The return type of the methodparameterTypes - The parameter types of the method@Nullable default MethodAccess tryGetMethod(java.lang.String name, java.lang.Class<?> returnType, java.lang.Class<?>... parameterTypes)
name - The name of the methodreturnType - The return type of the methodparameterTypes - The parameter types of the methodClassAccess[] getInnerClasses()
Class.getDeclaredClasses()<T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
T - The type of the annotationannotationClass - The class of the annotationClass.getDeclaredAnnotation(Class)