Class FieldFinder
java.lang.Object
nl.pim16aap2.util.reflection.FieldFinder
Represents a
ReflectionFinder for fields.
This class can be used to retrieve fields by name and by type. When retrieving by type, it can also return all fields of that type in the given source class.
Calls should be chained, as the instance can change between invocations of some methods.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classRepresents the second step of the field finder, after the source class has been specified.static final classRepresents an implementation ofReflectionFinderto retrieve all fields in a class of a given type.static final classRepresents an implementation ofReflectionFinderto retrieve a field by its name.static final classRepresents an implementation ofReflectionFinderto retrieve a field by its type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the class this field finder will search in for fields.
-
Constructor Details
-
FieldFinder
public FieldFinder()
-
-
Method Details
-
inClass
@CheckReturnValue @Contract(pure=true) public FieldFinder.FieldFinderInSource inClass(Class<?> source) Sets the class this field finder will search in for fields.- Parameters:
source- The class to analyze.- Returns:
- The next step in the field finding process.
-