T - the class's type.public interface RefClass<T> extends RefAnnotated
Class.| Modifier and Type | Method and Description |
|---|---|
@NotNull Optional<RefConstructed<T>> |
getConstructor(int number)
gets constructor by number of arguments.
|
@NotNull Optional<RefConstructed<T>> |
getConstructor(Object... types)
gets existing constructor by types.
|
@NotNull List<RefField> |
getDeclaredFields()
gets all declared fields.
|
default <A extends Annotation> |
getDeclaredFieldsWithAnnotation(@NotNull Class<A> annotationClass)
gets a declared field list that has the given annotation.
|
default <A extends Annotation> |
getDeclaredFieldsWithAnnotation(@NotNull Class<A> annotationClass,
@NotNull BiConsumer<RefField,A> consumer)
gets a declared field list that has the given annotation and runs the consumer for each found field.
|
@NotNull List<RefMethod> |
getDeclaredMethods()
gets all declared methods.
|
default <A extends Annotation> |
getDeclaredMethodsWithAnnotation(@NotNull Class<A> annotationClass)
gets a method field list that has the given annotation.
|
default <A extends Annotation> |
getDeclaredMethodsWithAnnotation(@NotNull Class<A> annotationClass,
@NotNull BiConsumer<RefMethod,A> consumer)
gets a declared method list that has the given annotation and runs the consumer for each found method.
|
@NotNull Optional<RefField> |
getField(@NotNull Class<?> type)
gets field by type.
|
<X> @NotNull Optional<RefField> |
getField(@NotNull RefClass<X> type)
gets field by type.
|
@NotNull Optional<RefField> |
getField(@NotNull String name)
gets field by name.
|
@NotNull List<RefField> |
getFields()
gets all fields.
|
default <A extends Annotation> |
getFieldsWithAnnotation(@NotNull Class<A> annotationClass)
gets a field list that has the given annotation.
|
default <A extends Annotation> |
getFieldsWithAnnotation(@NotNull Class<A> annotationClass,
@NotNull BiConsumer<RefField,A> consumer)
gets a field list that has the given annotation and runs the consumer for each found field.
|
@NotNull Optional<RefMethod> |
getMethod(@NotNull String name,
Object... types)
gets existing method by name and types.
|
@NotNull Optional<RefMethod> |
getMethodByName(String... names)
gets method by name.
|
@NotNull Optional<RefMethod> |
getMethodByParameter(Object... types)
gets method by type parameters.
|
@NotNull Optional<RefMethod> |
getMethodByReturnType(@NotNull Class<?> type)
gets method by return value.
|
<X> @NotNull Optional<RefMethod> |
getMethodByReturnType(@NotNull RefClass<X> type)
gets method by return value.
|
@NotNull List<RefMethod> |
getMethods()
gets all methods.
|
default <A extends Annotation> |
getMethodsWithAnnotation(@NotNull Class<A> annotationClass)
gets a method list that has the given annotation.
|
default <A extends Annotation> |
getMethodsWithAnnotation(@NotNull Class<A> annotationClass,
@NotNull BiConsumer<RefMethod,A> consumer)
gets a method list that has the given annotation and runs the consumer for each found method.
|
@NotNull Optional<RefConstructed<T>> |
getPrimitiveConstructor(Object... types)
gets existing constructor by types.
|
@NotNull Optional<RefMethod> |
getPrimitiveMethod(@NotNull String name,
Object... types)
gets existing method by name and types.
|
@NotNull Optional<RefMethod> |
getPrimitiveMethodByParameter(Object... types)
gets method by type parameters.
|
@NotNull Class<T> |
getRealClass()
obtains the real class.
|
boolean |
isInstance(@NotNull Object object)
checks if the given object is instance of
this. |
getAnnotation, getAnnotation, hasAnnotation@NotNull default <A extends Annotation> @NotNull List<RefField> getFieldsWithAnnotation(@NotNull @NotNull Class<A> annotationClass)
A - the annotation type.annotationClass - the annotation class to get.default <A extends Annotation> void getFieldsWithAnnotation(@NotNull @NotNull Class<A> annotationClass, @NotNull @NotNull BiConsumer<RefField,A> consumer)
A - the annotation type.annotationClass - the annotation class to get.consumer - the consumer to run.@NotNull default <A extends Annotation> @NotNull List<RefField> getDeclaredFieldsWithAnnotation(@NotNull @NotNull Class<A> annotationClass)
A - the annotation type.annotationClass - the annotation class to get.default <A extends Annotation> void getDeclaredFieldsWithAnnotation(@NotNull @NotNull Class<A> annotationClass, @NotNull @NotNull BiConsumer<RefField,A> consumer)
A - the annotation type.annotationClass - the annotation class to get.consumer - the consumer to run.@NotNull default <A extends Annotation> @NotNull List<RefMethod> getMethodsWithAnnotation(@NotNull @NotNull Class<A> annotationClass)
A - the annotation type.annotationClass - the annotation class to get.default <A extends Annotation> void getMethodsWithAnnotation(@NotNull @NotNull Class<A> annotationClass, @NotNull @NotNull BiConsumer<RefMethod,A> consumer)
A - the annotation type.annotationClass - the annotation class to get.consumer - the consumer to run.@NotNull default <A extends Annotation> @NotNull List<RefMethod> getDeclaredMethodsWithAnnotation(@NotNull @NotNull Class<A> annotationClass)
A - the annotation type.annotationClass - the annotation class to get.default <A extends Annotation> void getDeclaredMethodsWithAnnotation(@NotNull @NotNull Class<A> annotationClass, @NotNull @NotNull BiConsumer<RefMethod,A> consumer)
A - the annotation type.annotationClass - the annotation class to get.consumer - the consumer to run.@NotNull @NotNull Class<T> getRealClass()
boolean isInstance(@NotNull
@NotNull Object object)
this.object - the object to check.Class.isInstance(Object)@NotNull @NotNull Optional<RefMethod> getPrimitiveMethod(@NotNull @NotNull String name, @NotNull Object... types)
name - the name to get.types - the method parameter types to get.RefMethod object.@NotNull @NotNull Optional<RefMethod> getMethod(@NotNull @NotNull String name, @NotNull Object... types)
name - the name to get.types - method parameter types to get.RefMethod object.@NotNull @NotNull Optional<RefMethod> getPrimitiveMethodByParameter(@NotNull Object... types)
types - the parameter types to get.RefMethod object.@NotNull @NotNull Optional<RefMethod> getMethodByParameter(@NotNull Object... types)
types - the parameter types to get.RefMethod object.@NotNull @NotNull Optional<RefMethod> getMethodByName(@NotNull String... names)
names - the names to get.RefMethod object.@NotNull <X> @NotNull Optional<RefMethod> getMethodByReturnType(@NotNull @NotNull RefClass<X> type)
X - the class type of the return type.type - the type to get.RefMethod object.@NotNull @NotNull Optional<RefMethod> getMethodByReturnType(@NotNull @NotNull Class<?> type)
type - the type to get.RefMethod object.@NotNull @NotNull Optional<RefConstructed<T>> getPrimitiveConstructor(@NotNull Object... types)
types - the parameter types to get.RefConstructed object.@NotNull @NotNull Optional<RefConstructed<T>> getConstructor(@NotNull Object... types)
types - the parameter types to get.RefConstructed object.@NotNull @NotNull Optional<RefConstructed<T>> getConstructor(int number)
number - the number to get.RefConstructed object.@NotNull @NotNull Optional<RefField> getField(@NotNull @NotNull String name)
name - the name to get.RefField object.@NotNull <X> @NotNull Optional<RefField> getField(@NotNull @NotNull RefClass<X> type)
X - the class type of the field.type - the type to getRefField object.@NotNull @NotNull Optional<RefField> getField(@NotNull @NotNull Class<?> type)
type - the type to get.RefField object.@NotNull @NotNull List<RefField> getFields()
@NotNull @NotNull List<RefField> getDeclaredFields()
@NotNull @NotNull List<RefMethod> getMethods()
Copyright © 2021. All rights reserved.