Package nl.pim16aap2.util.reflection
Class ConstructorFinder.ConstructorFinderInSource
java.lang.Object
nl.pim16aap2.util.reflection.ReflectionFinder<Constructor<?>,ConstructorFinder.ConstructorFinderInSource>
nl.pim16aap2.util.reflection.ReflectionFinder.ReflectionFinderWithParameters<Constructor<?>,ConstructorFinder.ConstructorFinderInSource>
nl.pim16aap2.util.reflection.ConstructorFinder.ConstructorFinderInSource
- All Implemented Interfaces:
IAccessibleSetter<ConstructorFinder.ConstructorFinderInSource>,IAnnotationFinder<ConstructorFinder.ConstructorFinderInSource>
- Enclosing class:
ConstructorFinder
public static final class ConstructorFinder.ConstructorFinderInSource
extends ReflectionFinder.ReflectionFinderWithParameters<Constructor<?>,ConstructorFinder.ConstructorFinderInSource>
implements IAccessibleSetter<ConstructorFinder.ConstructorFinderInSource>, IAnnotationFinder<ConstructorFinder.ConstructorFinderInSource>
Represents an implementation of
ReflectionFinder-
Nested Class Summary
Nested classes/interfaces inherited from class nl.pim16aap2.util.reflection.ReflectionFinder
ReflectionFinder.ReflectionFinderWithParameters<T,U extends ReflectionFinder.ReflectionFinderWithParameters<T, U>> -
Field Summary
Fields inherited from class nl.pim16aap2.util.reflection.ReflectionFinder.ReflectionFinderWithParameters
parametersFields inherited from class nl.pim16aap2.util.reflection.ReflectionFinder
modifiers -
Method Summary
Modifier and TypeMethodDescriptionConstructor<?> get()Retrieves the target reflection object(s) using the current configuration.List<Constructor<?>> getAll()@Nullable Constructor<?> Retrieves the target reflection object(s) using the current configuration.Sets the returned reflection object(s) as accessible.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 nl.pim16aap2.util.reflection.ReflectionFinder.ReflectionFinderWithParameters
ignoreParameters, withoutParameters, withParameters, withParameters, withParametersMethods inherited from class nl.pim16aap2.util.reflection.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<?>,ConstructorFinder.ConstructorFinderInSource> - Returns:
- The target reflection object(s) being searched for.
-
getAll
- 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<?>,ConstructorFinder.ConstructorFinderInSource> - 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<ConstructorFinder.ConstructorFinderInSource>- Returns:
- The current object.
-
withAnnotations
@SafeVarargs public final ConstructorFinder.ConstructorFinderInSource 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<ConstructorFinder.ConstructorFinderInSource>- Parameters:
annotations- The annotations the constructor should have.- Returns:
- The current object.
-