Class ConstructorFinder.ConstructorFinderInSource<T>
java.lang.Object
nl.pim16aap2.util.reflection.ReflectionFinder<Constructor<T>, ConstructorFinder.ConstructorFinderInSource<T>>
nl.pim16aap2.util.reflection.ReflectionFinder.ReflectionFinderWithParameters<Constructor<T>, ConstructorFinder.ConstructorFinderInSource<T>>
nl.pim16aap2.util.reflection.ConstructorFinder.ConstructorFinderInSource<T>
- All Implemented Interfaces:
IAccessibleSetter<ConstructorFinder.ConstructorFinderInSource<T>>, IAnnotationFinder<ConstructorFinder.ConstructorFinderInSource<T>>
- Enclosing class:
ConstructorFinder
public static final class ConstructorFinder.ConstructorFinderInSource<T>
extends ReflectionFinder.ReflectionFinderWithParameters<Constructor<T>, ConstructorFinder.ConstructorFinderInSource<T>>
implements IAccessibleSetter<ConstructorFinder.ConstructorFinderInSource<T>>, IAnnotationFinder<ConstructorFinder.ConstructorFinderInSource<T>>
Represents an implementation of
ReflectionFinder-
Nested Class Summary
Nested classes/interfaces inherited from class ReflectionFinder
ReflectionFinder.ReflectionFinderWithParameters<T,U> -
Field Summary
Fields inherited from class ReflectionFinder.ReflectionFinderWithParameters
parametersFields inherited from class ReflectionFinder
modifiers -
Method Summary
Modifier and TypeMethodDescriptionget()Retrieves the target reflection object(s) using the current configuration.List<Constructor<T>> getAll()Gets all constructors that match the provided data.@Nullable Constructor<T> Retrieves the target reflection object(s) using the current configuration.Sets the returned reflection object(s) as accessible.toString()withAnnotations(Class<? extends Annotation>... annotations) Adds a requirement that the target constructor should contain at least a set of given annotations.Methods inherited from class ReflectionFinder.ReflectionFinderWithParameters
ignoreParameters, withoutParameters, withParameters, withParameters, withParametersMethods inherited from class ReflectionFinder
addModifiers, withModifiers
-
Method Details
-
get
Description copied from class:ReflectionFinderRetrieves the target reflection object(s) using the current configuration.This may throw an exception if the lookup hasn't been configured yet.
- Specified by:
getin classReflectionFinder<Constructor<T>, ConstructorFinder.ConstructorFinderInSource<T>>- Returns:
- The target reflection object(s) being searched for.
-
getAll
Gets all constructors that match the provided data.- Returns:
- All constructors that match the provided data.
-
getNullable
Description copied from class:ReflectionFinderRetrieves the target reflection object(s) using the current configuration.This may throw an exception if the lookup hasn't been configured yet.
- Specified by:
getNullablein classReflectionFinder<Constructor<T>, ConstructorFinder.ConstructorFinderInSource<T>>- Returns:
- The target reflection object(s) being searched for or null if no object(s) could be found.
-
setAccessible
Description copied from interface:IAccessibleSetterSets the returned reflection object(s) as accessible.- Specified by:
setAccessiblein interfaceIAccessibleSetter<T>- Returns:
- The current object.
-
withAnnotations
@SafeVarargs public final ConstructorFinder.ConstructorFinderInSource<T> withAnnotations(Class<? extends Annotation>... annotations) Description copied from interface:IAnnotationFinderAdds a requirement that the target constructor should contain at least a set of given annotations.- Specified by:
withAnnotationsin interfaceIAnnotationFinder<T>- Parameters:
annotations- The annotations the constructor should have.- Returns:
- The current object.
-
toString
-