Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- ACCESSIBLE_OFFSET - Static variable in class dev.derklaro.reflexion.internal.unsafe.UnsafeAccessibleObject
- ACCESSOR_FACTORY - Static variable in class dev.derklaro.reflexion.Reflexion
-
The current used accessor factory to wrap fields, methods and constructors.
- AccessorFactory - Interface in dev.derklaro.reflexion
-
A conversion factory from java reflection types to reflexion wrappers of them.
- AccessorFactoryLoader - Class in dev.derklaro.reflexion.internal
-
Internal: loads the best accessor factory for the current environment of the jvm.
- AccessorFactoryLoader() - Constructor for class dev.derklaro.reflexion.internal.AccessorFactoryLoader
- accFactory - Variable in class dev.derklaro.reflexion.Reflexion
- allMatch(T[], T[], BiPredicate<T, T>) - Static method in class dev.derklaro.reflexion.internal.util.Util
-
Checks if all elements in both arrays match taking care of some edge cases to reduce computation time.
- and(Predicate<? super T>) - Method in class dev.derklaro.reflexion.matcher.BaseMatcher
-
Composes the current matching predicate with the supplied one using an AND operation.
- asOptional() - Method in class dev.derklaro.reflexion.Result
-
Wraps the successful value of this result in an optional.
B
- BareAccessorFactory - Class in dev.derklaro.reflexion.internal.bare
-
An accessor factory which creates accessors based on the plain java.lang.reflect members.
- BareAccessorFactory() - Constructor for class dev.derklaro.reflexion.internal.bare.BareAccessorFactory
- BareAccessorFactory.BareConstructorAccessor - Class in dev.derklaro.reflexion.internal.bare
-
A constructor accessor which invokes constructors based on the given bare constructor.
- BareAccessorFactory.BareFieldAccessor - Class in dev.derklaro.reflexion.internal.bare
-
A field accessor which invokes the bare java.lang.reflect field.
- BareAccessorFactory.BareMethodAccessor - Class in dev.derklaro.reflexion.internal.bare
-
A method accessor which invokes the given bare method.
- BareConstructorAccessor(Reflexion, Constructor<?>) - Constructor for class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareConstructorAccessor
-
Constructs a new bare constructor accessor instance.
- BareFieldAccessor(Field, Reflexion) - Constructor for class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareFieldAccessor
-
Constructs a new bare field accessor instance.
- BareMethodAccessor(Method, Reflexion) - Constructor for class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareMethodAccessor
-
Constructs a new bare method accessor instance.
- BaseAccessor<T> - Interface in dev.derklaro.reflexion
-
Represents the base for all accessors created by this library.
- BaseMatcher<T,
M> - Class in dev.derklaro.reflexion.matcher -
The base for all matcher which can match some kind of member in a class.
- BaseMatcher() - Constructor for class dev.derklaro.reflexion.matcher.BaseMatcher
- bind(Object) - Method in class dev.derklaro.reflexion.Reflexion
-
Binds the current reflexion instance to the given binding even when this instance is already bound to an instance.
- binding - Variable in class dev.derklaro.reflexion.Reflexion
C
- constructor - Variable in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareConstructorAccessor
- ConstructorMatcher - Class in dev.derklaro.reflexion.matcher
-
A matcher for constructors.
- ConstructorMatcher() - Constructor for class dev.derklaro.reflexion.matcher.ConstructorMatcher
- constructors - Variable in class dev.derklaro.reflexion.Reflexion
- consume(BiConsumer<S, Throwable>) - Method in class dev.derklaro.reflexion.Result
-
Consumes both, the successful and exceptional result value wrapped in this result and passes them to the given consumer.
- convertFieldToGeneric(Field, boolean, boolean) - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory
-
Converts the given field to a generic handle which can be invoked using an object and returns an object rather than requiring exact class instances.
- convertToGeneric(MethodHandle, boolean, boolean) - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory
-
Converts the given method handle to a generic handle which can be invoked with an array of objects and returns an object rather than requiring exact class instances.
- currentMatcher - Variable in class dev.derklaro.reflexion.matcher.BaseMatcher
D
- DEFAULT_FACTORIES - Static variable in class dev.derklaro.reflexion.internal.AccessorFactoryLoader
- denyModifier(int) - Method in class dev.derklaro.reflexion.matcher.BaseMatcher
-
Checks if the given member doesn't have the given modifier.
- denyModifiers(int...) - Method in class dev.derklaro.reflexion.matcher.BaseMatcher
-
Checks if the given member doesn't have all the given modifiers.
- derivedType(Function<T, Class<?>>, Class<?>) - Method in class dev.derklaro.reflexion.matcher.BaseMatcher
-
Checks if the supplied type from the reader function is a derived instance of the given type (input instanceof expected).
- derivedTypeAt(Function<T, Class<?>[]>, Class<?>, int) - Method in class dev.derklaro.reflexion.matcher.BaseMatcher
-
Checks if the type array extracted from the target member has the given type at the given index (input instanceof expected).
- derivedTypes(Function<T, Class<?>[]>, Class<?>...) - Method in class dev.derklaro.reflexion.matcher.BaseMatcher
-
Checks if all types supplied by the given type reader match the given types.
- dev.derklaro.reflexion - package dev.derklaro.reflexion
- dev.derklaro.reflexion.internal - package dev.derklaro.reflexion.internal
- dev.derklaro.reflexion.internal.bare - package dev.derklaro.reflexion.internal.bare
- dev.derklaro.reflexion.internal.handles - package dev.derklaro.reflexion.internal.handles
- dev.derklaro.reflexion.internal.unsafe - package dev.derklaro.reflexion.internal.unsafe
- dev.derklaro.reflexion.internal.util - package dev.derklaro.reflexion.internal.util
- dev.derklaro.reflexion.matcher - package dev.derklaro.reflexion.matcher
- doLoadFactory() - Static method in class dev.derklaro.reflexion.internal.AccessorFactoryLoader
-
Loads the best factory for the current environment, also making use of the service loader to allow other libraries to opt in and offer their own implementation of an accessor factory.
E
- ensureTrue(boolean, String) - Static method in class dev.derklaro.reflexion.internal.util.Util
-
Ensures that the given condition is true, throwing an exception with the given message otherwise.
- exactType(Function<T, Class<?>>, Class<?>) - Method in class dev.derklaro.reflexion.matcher.BaseMatcher
-
Checks if the supplied type from the reader function is exactly the given expected type.
- exactTypeAt(Function<T, Class<?>[]>, Class<?>, int) - Method in class dev.derklaro.reflexion.matcher.BaseMatcher
-
Checks if the type array extracted from the target member has the given type at the given index.
- exactTypes(Function<T, Class<?>[]>, Class<?>...) - Method in class dev.derklaro.reflexion.matcher.BaseMatcher
-
Checks if all types supplied by the given type reader match the given types.
- exception - Variable in class dev.derklaro.reflexion.Result
- exceptional(Throwable) - Static method in class dev.derklaro.reflexion.Result
-
Constructs a new result instance which failed and holds the given exception as the reason of the failure.
- Exceptions - Class in dev.derklaro.reflexion.internal.util
-
A utility to improve working with exceptions thrown during the program runtime.
- Exceptions() - Constructor for class dev.derklaro.reflexion.internal.util.Exceptions
F
- field - Variable in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareFieldAccessor
- field - Variable in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleFieldAccessor
- FieldAccessor - Interface in dev.derklaro.reflexion
-
An accessor which wraps a java.lang.reflect Field and makes it much easier to read/write from/to it.
- FieldMatcher - Class in dev.derklaro.reflexion.matcher
-
A matcher for fields.
- FieldMatcher() - Constructor for class dev.derklaro.reflexion.matcher.FieldMatcher
- fields - Variable in class dev.derklaro.reflexion.Reflexion
- filterAndMap(Collection<T>, Predicate<T>, Function<T, O>) - Static method in class dev.derklaro.reflexion.internal.util.Util
-
Filters all elements from the given collection and applies the matching ones to the given mapper and returns a collection containing all filtered and mapped elements.
- find(String) - Static method in class dev.derklaro.reflexion.Reflexion
-
Tries to find and wrap a class with the given name in a reflexion instance.
- find(String, ClassLoader) - Static method in class dev.derklaro.reflexion.Reflexion
-
Tries to find and wrap a class with the given name in a reflexion instance.
- findAny(String...) - Static method in class dev.derklaro.reflexion.Reflexion
-
Tries to find and wrap a class with one of the given names.
- findAny(ClassLoader, String...) - Static method in class dev.derklaro.reflexion.Reflexion
-
Tries to find and wrap a class with one of the given names.
- findConstructor(ConstructorMatcher) - Method in class dev.derklaro.reflexion.Reflexion
-
Finds the first constructor matching the given matcher in the wrapped class and creates a method accessor wrapper for it.
- findConstructor(Class<?>...) - Method in class dev.derklaro.reflexion.Reflexion
-
Finds a constructor with the given parameter types in the wrapped class and creates a method accessor wrapper for it.
- findConstructors(ConstructorMatcher) - Method in class dev.derklaro.reflexion.Reflexion
-
Finds all constructors matching the given matcher in the wrapped class and creates a method accessor wrapper for it.
- findField(FieldMatcher) - Method in class dev.derklaro.reflexion.Reflexion
-
Finds the first field which matches the given matcher.
- findField(String) - Method in class dev.derklaro.reflexion.Reflexion
-
Finds a field with the given name in the wrapped class and creates a field accessor wrapper for it.
- findFields(FieldMatcher) - Method in class dev.derklaro.reflexion.Reflexion
-
Finds all fields which are matching the given matcher.
- findImplLookup() - Static method in class dev.derklaro.reflexion.internal.handles.ImplLookupAccessor
-
Tries to get the IMPL_LOOKUP using the either direct field access or the methods provided by sun.misc.Unsafe.
- findMethod(MethodMatcher) - Method in class dev.derklaro.reflexion.Reflexion
-
Finds the first method which matches the given matcher in the wrapped class and creates a method accessor wrapper for it.
- findMethod(String, Class<?>...) - Method in class dev.derklaro.reflexion.Reflexion
-
Finds a method with the given name and parameter types in the wrapped class and creates a method accessor wrapper for it.
- findMethods(MethodMatcher) - Method in class dev.derklaro.reflexion.Reflexion
-
Finds all methods which are matching the given matcher in the wrapped class and creates a method accessor wrapper for each of them.
- firstNonNull(T...) - Static method in class dev.derklaro.reflexion.internal.util.Util
-
Tries to find the first non-null value from the given array, returning null if no such value was found.
- flatMap(Function<S, Result<M>>) - Method in class dev.derklaro.reflexion.Result
-
Maps the successful result of this result into a new one or returns the same instance as before when this result already contained an exception.
- flatMapExceptional(Function<Throwable, Result<M>>) - Method in class dev.derklaro.reflexion.Result
-
Maps the wrapped exceptional result of this result into a new one or returns the same instance as before when this result was executed successfully.
G
- get() - Method in interface dev.derklaro.reflexion.Result.ExceptionalSupplier
-
Get the result of the supply.
- get() - Method in class dev.derklaro.reflexion.Result
-
Get the successful result wrapped in this result.
- get(String) - Static method in class dev.derklaro.reflexion.Reflexion
-
Tries to find and wrap a class with the given name in a reflexion instance.
- get(String, ClassLoader) - Static method in class dev.derklaro.reflexion.Reflexion
-
Tries to find and wrap a class with the given name in a reflexion instance.
- getAccessorFactory() - Method in class dev.derklaro.reflexion.Reflexion
-
Get the accessor factory which is associated with this reflexion instance.
- getAllConstructors(Class<?>) - Static method in class dev.derklaro.reflexion.ReflexionPopulator
-
Get all (declared) constructors in the given class, and it's super classes.
- getAllFields(Class<?>) - Static method in class dev.derklaro.reflexion.ReflexionPopulator
-
Get all (declared) fields in the given class, and it's super classes.
- getAllMethods(Class<?>) - Static method in class dev.derklaro.reflexion.ReflexionPopulator
-
Get all (declared) methods in the given class, and it's super classes.
- getAny(String...) - Static method in class dev.derklaro.reflexion.Reflexion
-
Tries to find and wrap a class with one of the given names.
- getAny(ClassLoader, String...) - Static method in class dev.derklaro.reflexion.Reflexion
-
Tries to find and wrap a class with one of the given names.
- getBinding() - Method in class dev.derklaro.reflexion.Reflexion
-
Gets the object instance to which this reflexion instance is bound.
- getBinding(Reflexion, Object, int) - Static method in class dev.derklaro.reflexion.internal.util.Util
-
Gets the binding instance to execute the requested action on a field or method.
- getConstructorCache() - Method in class dev.derklaro.reflexion.Reflexion
-
Internal: gets the constructor cache for the wrapped class.
- getException() - Method in class dev.derklaro.reflexion.Result
-
Get the exception which was thrown during the execution.
- getFieldCache() - Method in class dev.derklaro.reflexion.Reflexion
-
Internal: gets the field cache for the wrapped class.
- getMember() - Method in interface dev.derklaro.reflexion.BaseAccessor
-
Get the java.lang.reflect member which is wrapped by this accessor.
- getMember() - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareConstructorAccessor
-
Get the java.lang.reflect member which is wrapped by this accessor.
- getMember() - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareFieldAccessor
-
Get the java.lang.reflect member which is wrapped by this accessor.
- getMember() - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareMethodAccessor
-
Get the java.lang.reflect member which is wrapped by this accessor.
- getMember() - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleConstructorAccessor
-
Get the java.lang.reflect member which is wrapped by this accessor.
- getMember() - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleFieldAccessor
-
Get the java.lang.reflect member which is wrapped by this accessor.
- getMember() - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleMethodAccessor
-
Get the java.lang.reflect member which is wrapped by this accessor.
- getMethodCache() - Method in class dev.derklaro.reflexion.Reflexion
-
Internal: gets the method cache for the wrapped class.
- getOrElse(S) - Method in class dev.derklaro.reflexion.Result
-
Get the successful result wrapped in this result or the given value if this result was executed exceptionally.
- getOrEval(Supplier<S>) - Method in class dev.derklaro.reflexion.Result
-
Get the successful result wrapped in this result or evaluates the given supplier value and returns that.
- getOrMap(Function<Throwable, S>) - Method in class dev.derklaro.reflexion.Result
-
Get the successful result wrapped in this result or maps the wrapped exception using the supplied function.
- getOrThrow() - Method in class dev.derklaro.reflexion.Result
-
Get the wrapped success value of this result or rethrows the wrapped exception unchecked.
- getReflexion() - Method in interface dev.derklaro.reflexion.BaseAccessor
-
Get the reflexion instance which created this accessor instance.
- getReflexion() - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareConstructorAccessor
-
Get the reflexion instance which created this accessor instance.
- getReflexion() - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareFieldAccessor
-
Get the reflexion instance which created this accessor instance.
- getReflexion() - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareMethodAccessor
-
Get the reflexion instance which created this accessor instance.
- getReflexion() - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleConstructorAccessor
-
Get the reflexion instance which created this accessor instance.
- getReflexion() - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleFieldAccessor
-
Get the reflexion instance which created this accessor instance.
- getReflexion() - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleMethodAccessor
-
Get the reflexion instance which created this accessor instance.
- getter - Variable in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleFieldAccessor
- getTrustedLookup() - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory
-
Gets the IMPL_LOOKUP field instance if possible.
- getValue() - Method in interface dev.derklaro.reflexion.FieldAccessor
-
Gets the value of the wrapped field using the instance the reflexion object which created this instance is bound to (but only if the field is not static).
- getValue() - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareFieldAccessor
-
Gets the value of the wrapped field using the instance the reflexion object which created this instance is bound to (but only if the field is not static).
- getValue() - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleFieldAccessor
-
Gets the value of the wrapped field using the instance the reflexion object which created this instance is bound to (but only if the field is not static).
- getValue(Object) - Method in interface dev.derklaro.reflexion.FieldAccessor
-
Gets the value of the wrapped field using the given instance.
- getValue(Object) - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareFieldAccessor
-
Gets the value of the wrapped field using the given instance.
- getValue(Object) - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleFieldAccessor
-
Gets the value of the wrapped field using the given instance.
- getWrappedClass() - Method in class dev.derklaro.reflexion.Reflexion
-
Gets the class which is wrapped by this reflexion instance.
H
- hasMatchingName(String, int...) - Method in class dev.derklaro.reflexion.matcher.BaseMatcher
-
Checks if the member has a name which matches the given regexp.
- hasModifier(int) - Method in class dev.derklaro.reflexion.matcher.BaseMatcher
-
Checks if the member has the given modifier.
- hasModifiers(int...) - Method in class dev.derklaro.reflexion.matcher.BaseMatcher
-
Checks if the member has all the given modifiers.
- hasName(String) - Method in class dev.derklaro.reflexion.matcher.BaseMatcher
-
Checks if the member has the exact name which was supplied.
I
- ifExceptional(Consumer<Throwable>) - Method in class dev.derklaro.reflexion.Result
-
Executes the given consumer using the wrapped exceptional result value if present.
- ifSuccess(Consumer<S>) - Method in class dev.derklaro.reflexion.Result
-
Executes the given consumer using the wrapped successful result value if present.
- ImplLookupAccessor - Class in dev.derklaro.reflexion.internal.handles
-
An accessor to get the IMPL_LOOKUP field using the unsafe field methods provided by the jvm.
- ImplLookupAccessor() - Constructor for class dev.derklaro.reflexion.internal.handles.ImplLookupAccessor
- invoke() - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareConstructorAccessor
-
Invokes the underlying method using the instance the reflexion object used to create this accessor is bound to (if the method is not static).
- invoke() - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareMethodAccessor
-
Invokes the underlying method using the instance the reflexion object used to create this accessor is bound to (if the method is not static).
- invoke() - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleConstructorAccessor
-
Invokes the underlying method using the instance the reflexion object used to create this accessor is bound to (if the method is not static).
- invoke() - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleMethodAccessor
-
Invokes the underlying method using the instance the reflexion object used to create this accessor is bound to (if the method is not static).
- invoke() - Method in interface dev.derklaro.reflexion.MethodAccessor
-
Invokes the underlying method using the instance the reflexion object used to create this accessor is bound to (if the method is not static).
- invoke(Object) - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareConstructorAccessor
-
Invokes the underlying method using the given instance.
- invoke(Object) - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareMethodAccessor
-
Invokes the underlying method using the given instance.
- invoke(Object) - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleConstructorAccessor
-
Invokes the underlying method using the given instance.
- invoke(Object) - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleMethodAccessor
-
Invokes the underlying method using the given instance.
- invoke(Object) - Method in interface dev.derklaro.reflexion.MethodAccessor
-
Invokes the underlying method using the given instance.
- invoke(Object, Object...) - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareConstructorAccessor
-
Invokes the underlying method using the given instance.
- invoke(Object, Object...) - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareMethodAccessor
-
Invokes the underlying method using the given instance.
- invoke(Object, Object...) - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleConstructorAccessor
-
Invokes the underlying method using the given instance.
- invoke(Object, Object...) - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleMethodAccessor
-
Invokes the underlying method using the given instance.
- invoke(Object, Object...) - Method in interface dev.derklaro.reflexion.MethodAccessor
-
Invokes the underlying method using the given instance.
- invokeMethod(String, Class<?>[], Object...) - Static method in class dev.derklaro.reflexion.internal.unsafe.UnsafeAccess
-
Calls the given method which is provided in sun.misc.Unsafe.
- invokeWithArgs(Object...) - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareConstructorAccessor
-
Invokes the underlying method using the instance the reflexion object used to create this accessor is bound to (if the method is not static).
- invokeWithArgs(Object...) - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareMethodAccessor
-
Invokes the underlying method using the instance the reflexion object used to create this accessor is bound to (if the method is not static).
- invokeWithArgs(Object...) - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleConstructorAccessor
-
Invokes the underlying method using the instance the reflexion object used to create this accessor is bound to (if the method is not static).
- invokeWithArgs(Object...) - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleMethodAccessor
-
Invokes the underlying method using the instance the reflexion object used to create this accessor is bound to (if the method is not static).
- invokeWithArgs(Object...) - Method in interface dev.derklaro.reflexion.MethodAccessor
-
Invokes the underlying method using the instance the reflexion object used to create this accessor is bound to (if the method is not static).
- isAvailable() - Method in interface dev.derklaro.reflexion.AccessorFactory
-
Checks if this factory is available.
- isAvailable() - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory
-
Checks if this factory is available.
- isAvailable() - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory
-
Checks if this factory is available.
- isAvailable() - Static method in class dev.derklaro.reflexion.internal.unsafe.UnsafeAccess
-
Checks if the sun.misc.Unsafe instance could be resolved during the class init, and is now ready to call method with it.
- isAvailable() - Static method in class dev.derklaro.reflexion.internal.unsafe.UnsafeAccessibleObject
-
Checks if the offset of the override field in AccessibleObject could get resolved and can be used to override the field when calling
UnsafeAccessibleObject.makeAccessible(AccessibleObject). - isClassPresent(String) - Static method in class dev.derklaro.reflexion.internal.util.Util
-
Checks if a class with the given name is present in the current runtime.
- isFatal(Throwable) - Static method in class dev.derklaro.reflexion.internal.util.Exceptions
-
Get if the given exception is an unrecoverable error which prevents the program to resume (on the current thread).
M
- makeAccessible(AccessibleObject) - Static method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory
-
Makes the given accessible object accessible, either using force through sun.misc.Unsafe or by using direct access to AccessibleObject.setAccessible.
- makeAccessible(AccessibleObject) - Static method in class dev.derklaro.reflexion.internal.unsafe.UnsafeAccessibleObject
-
Makes the given accessible object accessible.
- map(Function<S, M>) - Method in class dev.derklaro.reflexion.Result
-
Maps the successful result of this result into a new one or returns the same instance as before when this result already contained an exception.
- mapExceptional(Function<Throwable, Throwable>) - Method in class dev.derklaro.reflexion.Result
-
Maps the wrapped exceptional result of this result into a new one or returns the same instance as before when this result was executed successfully.
- mappingHierarchyTravel(Class<?>, Function<Class<?>, T[]>) - Static method in class dev.derklaro.reflexion.ReflexionPopulator
-
Travels down the class tree beginning from the given topmost class, extracting all public and declared members from each visited class (using the given extractor functions) and collects them into a set.
- method - Variable in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareMethodAccessor
- method - Variable in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleConstructorAccessor
- method - Variable in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleMethodAccessor
- MethodAccessor<T> - Interface in dev.derklaro.reflexion
-
An accessor which wraps a java.lang.reflect Method and makes it much easier to invoke it.
- methodHandle - Variable in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleConstructorAccessor
- methodHandle - Variable in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleMethodAccessor
- MethodHandleAccessorFactory - Class in dev.derklaro.reflexion.internal.handles
-
A reflexion accessor factory which uses method handles to wrap methods and fields.
- MethodHandleAccessorFactory() - Constructor for class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory
-
Constructs a new method handle accessor factory instance.
- MethodHandleAccessorFactory.MethodHandleConstructorAccessor - Class in dev.derklaro.reflexion.internal.handles
-
A method accessor for constructors which is based on method handles.
- MethodHandleAccessorFactory.MethodHandleFieldAccessor - Class in dev.derklaro.reflexion.internal.handles
-
An accessor for field get/set access using method handles.
- MethodHandleAccessorFactory.MethodHandleMethodAccessor - Class in dev.derklaro.reflexion.internal.handles
-
A method accessor based on method handles.
- MethodHandleConstructorAccessor(Constructor<?>, Reflexion, MethodHandle) - Constructor for class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleConstructorAccessor
-
Constructs a new method handle constructor accessor instance.
- MethodHandleFieldAccessor(Field, Reflexion, MethodHandle, MethodHandle) - Constructor for class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleFieldAccessor
-
Constructs a new method handle field accessor instance.
- MethodHandleMethodAccessor(Method, Reflexion, MethodHandle) - Constructor for class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleMethodAccessor
-
Constructs a new method handle method accessor instance.
- MethodMatcher - Class in dev.derklaro.reflexion.matcher
-
A matcher for methods.
- MethodMatcher() - Constructor for class dev.derklaro.reflexion.matcher.MethodMatcher
- methods - Variable in class dev.derklaro.reflexion.Reflexion
N
- negate() - Method in class dev.derklaro.reflexion.matcher.BaseMatcher
-
Negates the current matching predicate.
- newMatcher() - Static method in class dev.derklaro.reflexion.matcher.ConstructorMatcher
-
Constructs a new constructor matcher instance.
- newMatcher() - Static method in class dev.derklaro.reflexion.matcher.FieldMatcher
-
Constructs a new field matcher instance.
- newMatcher() - Static method in class dev.derklaro.reflexion.matcher.MethodMatcher
-
Constructs a new method matcher instance.
O
- on(Class<?>) - Static method in class dev.derklaro.reflexion.Reflexion
-
Constructs a new reflexion instance wrapping and targeting the given class.
- on(Class<?>, Object) - Static method in class dev.derklaro.reflexion.Reflexion
-
Constructs a new reflexion instance wrapping the given class and binds it to the given object instance, if any is provided.
- on(Class<?>, Object, AccessorFactory) - Static method in class dev.derklaro.reflexion.Reflexion
-
Constructs a new reflexion instance wrapping the given class and binds it to the given object instance, if any is provided.
- on(Object) - Static method in class dev.derklaro.reflexion.Reflexion
-
Constructs a new reflexion instance wrapping the class of the given object instance.
- onBound(Object) - Static method in class dev.derklaro.reflexion.Reflexion
-
Constructs a new reflexion instance wrapping the class of the given object instance and binds it to the given instance.
- or(Predicate<? super T>) - Method in class dev.derklaro.reflexion.matcher.BaseMatcher
-
Composes the current matching predicate with the supplied one using an OR operation.
P
- parameterCount(int) - Method in class dev.derklaro.reflexion.matcher.ConstructorMatcher
-
Checks if the constructor has the given amount of parameters.
- parameterCount(int) - Method in class dev.derklaro.reflexion.matcher.MethodMatcher
-
Checks if the method has the given amount of parameters.
R
- reflexion - Variable in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareConstructorAccessor
- reflexion - Variable in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareFieldAccessor
- reflexion - Variable in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareMethodAccessor
- reflexion - Variable in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleConstructorAccessor
- reflexion - Variable in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleFieldAccessor
- reflexion - Variable in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleMethodAccessor
- Reflexion - Class in dev.derklaro.reflexion
-
The main entry point for working with the reflexion library.
- Reflexion(Class<?>, Object, AccessorFactory) - Constructor for class dev.derklaro.reflexion.Reflexion
-
Constructs a new reflexion instance.
- ReflexionException - Exception Class in dev.derklaro.reflexion
-
Represents a custom runtime exception which is exclusively thrown by methods in this library to make it easier to catch them rather than having general exception types.
- ReflexionException(String) - Constructor for exception class dev.derklaro.reflexion.ReflexionException
-
Constructs a new reflexion exception instance.
- ReflexionException(Throwable) - Constructor for exception class dev.derklaro.reflexion.ReflexionException
-
Constructs a new reflexion exception instance.
- ReflexionPopulator - Class in dev.derklaro.reflexion
-
Internal utility class to read all java.lang.reflect members from a class and its super classes.
- ReflexionPopulator() - Constructor for class dev.derklaro.reflexion.ReflexionPopulator
- result - Variable in class dev.derklaro.reflexion.Result
- Result<S> - Class in dev.derklaro.reflexion
-
A rust inspired result class which either holds the result of an executable or the exception thrown by it.
- Result(S, Throwable) - Constructor for class dev.derklaro.reflexion.Result
-
Constructs a new result type.
- Result.ExceptionalSupplier<T> - Interface in dev.derklaro.reflexion
-
Represents a supplier which can throw any exception when executing.
- rethrowIfFatal(Throwable) - Static method in class dev.derklaro.reflexion.internal.util.Exceptions
-
Rethrows the given exception if it signals an unrecoverable error which prevents the program to resume (on the current thread).
S
- serialVersionUID - Static variable in exception class dev.derklaro.reflexion.ReflexionException
- setter - Variable in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleFieldAccessor
- setValue(Object) - Method in interface dev.derklaro.reflexion.FieldAccessor
-
Sets the value of the wrapped field using the instance the reflexion object which created this instance is bound to (but only if the field is not static).
- setValue(Object) - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareFieldAccessor
-
Sets the value of the wrapped field using the instance the reflexion object which created this instance is bound to (but only if the field is not static).
- setValue(Object) - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleFieldAccessor
-
Sets the value of the wrapped field using the instance the reflexion object which created this instance is bound to (but only if the field is not static).
- setValue(Object, Object) - Method in interface dev.derklaro.reflexion.FieldAccessor
-
Sets the value of the wrapped field in the given object instance.
- setValue(Object, Object) - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory.BareFieldAccessor
-
Sets the value of the wrapped field in the given object instance.
- setValue(Object, Object) - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory.MethodHandleFieldAccessor
-
Sets the value of the wrapped field in the given object instance.
- SOME_FIELD - Static variable in class dev.derklaro.reflexion.internal.unsafe.UnsafeAccessibleObject
- success(T) - Static method in class dev.derklaro.reflexion.Result
-
Constructs a new result instance holding the given object as its successful result.
- superType(Function<T, Class<?>>, Class<?>) - Method in class dev.derklaro.reflexion.matcher.BaseMatcher
-
Checks if the supplied type from the reader function is an instance of the expected type (expected instanceof input).
- superTypeAt(Function<T, Class<?>[]>, Class<?>, int) - Method in class dev.derklaro.reflexion.matcher.BaseMatcher
-
Checks if the type array extracted from the target member has the given type at the given index (expected instanceof input).
- superTypes(Function<T, Class<?>[]>, Class<?>...) - Method in class dev.derklaro.reflexion.matcher.BaseMatcher
-
Checks if all types supplied by the given type reader match the given types.
T
- test(T) - Method in class dev.derklaro.reflexion.matcher.BaseMatcher
- THE_UNSAFE - Static variable in class dev.derklaro.reflexion.internal.unsafe.UnsafeAccess
- throwUnchecked(Throwable) - Static method in class dev.derklaro.reflexion.internal.util.Exceptions
-
Throws the given exception as an unchecked exception removing the need to catch non-runtime exceptions.
- trustedLookup - Variable in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory
- tryExecute(Result.ExceptionalSupplier<T>) - Static method in class dev.derklaro.reflexion.Result
-
Tries to execute the supplier and use the result of it as the value of this result.
- tryResolveUsingDirectAccess() - Static method in class dev.derklaro.reflexion.internal.handles.ImplLookupAccessor
-
Tries to resolve the IMPL_LOOKUP field by direct access, only available on a modern jvm if unnamed modules were granted access to the java.lang.invoke module.
- tryResolveUsingUnsafeAccessibleObject() - Static method in class dev.derklaro.reflexion.internal.handles.ImplLookupAccessor
-
Tries to resolve the IMPL_LOOKUP field using the methods provided by sun.misc.unsafe.
- tryResolveUsingUnsafeGetObject() - Static method in class dev.derklaro.reflexion.internal.handles.ImplLookupAccessor
-
Tries to resolve the IMPL_LOOKUP field using the methods provided by sun.misc.unsafe.
U
- unreflect(Constructor<?>) - Method in class dev.derklaro.reflexion.Reflexion
-
Unreflects the given constructor and wraps it in a method accessor, while preserving the functionality of bindings and better abstraction.
- unreflect(Field) - Method in class dev.derklaro.reflexion.Reflexion
-
Unreflects the given field and wraps it in a field accessor, while preserving the functionality of bindings and better abstraction.
- unreflect(Method) - Method in class dev.derklaro.reflexion.Reflexion
-
Unreflects the given method and wraps it in a method accessor, while preserving the functionality of bindings and better abstraction.
- unreflectConstructor(Constructor<?>) - Static method in class dev.derklaro.reflexion.Reflexion
-
Unreflects the given constructor and wraps it in a method accessor, while preserving the functionality of bindings and better abstraction.
- unreflectField(Field) - Static method in class dev.derklaro.reflexion.Reflexion
-
Unreflects the given field and wraps it in a field accessor, while preserving the functionality of bindings and better abstraction.
- unreflectMethod(Method) - Static method in class dev.derklaro.reflexion.Reflexion
-
Unreflects the given method and wraps it in a method accessor, while preserving the functionality of bindings and better abstraction.
- UnsafeAccess - Class in dev.derklaro.reflexion.internal.unsafe
-
A utility class which allows access to sun.misc.Unsafe without needing to hassle with it.
- UnsafeAccess() - Constructor for class dev.derklaro.reflexion.internal.unsafe.UnsafeAccess
- UnsafeAccessibleObject - Class in dev.derklaro.reflexion.internal.unsafe
-
A internal helper class which allows to set the
overrideboolean in the AccessibleObject class. - UnsafeAccessibleObject() - Constructor for class dev.derklaro.reflexion.internal.unsafe.UnsafeAccessibleObject
- Util - Class in dev.derklaro.reflexion.internal.util
-
A collection of general purpose utility methods used within the library.
- Util() - Constructor for class dev.derklaro.reflexion.internal.util.Util
W
- wasExceptional() - Method in class dev.derklaro.reflexion.Result
-
Get if this result execution failed for some reason.
- wasSuccessful() - Method in class dev.derklaro.reflexion.Result
-
Get if this result was executed successfully or if it failed for some reason.
- wrapConstructor(Reflexion, Constructor<?>) - Method in interface dev.derklaro.reflexion.AccessorFactory
-
Wraps the given java.lang.reflect constructor into a reflexion MethodAccessor wrapper.
- wrapConstructor(Reflexion, Constructor<?>) - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory
-
Wraps the given java.lang.reflect constructor into a reflexion MethodAccessor wrapper.
- wrapConstructor(Reflexion, Constructor<?>) - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory
-
Wraps the given java.lang.reflect constructor into a reflexion MethodAccessor wrapper.
- wrapField(Reflexion, Field) - Method in interface dev.derklaro.reflexion.AccessorFactory
-
Wraps the given java.lang.reflect field into a reflexion FieldAccessor wrapper.
- wrapField(Reflexion, Field) - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory
-
Wraps the given java.lang.reflect field into a reflexion FieldAccessor wrapper.
- wrapField(Reflexion, Field) - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory
-
Wraps the given java.lang.reflect field into a reflexion FieldAccessor wrapper.
- wrapMethod(Reflexion, Method) - Method in interface dev.derklaro.reflexion.AccessorFactory
-
Wraps the given java.lang.reflect method into a reflexion MethodAccessor wrapper.
- wrapMethod(Reflexion, Method) - Method in class dev.derklaro.reflexion.internal.bare.BareAccessorFactory
-
Wraps the given java.lang.reflect method into a reflexion MethodAccessor wrapper.
- wrapMethod(Reflexion, Method) - Method in class dev.derklaro.reflexion.internal.handles.MethodHandleAccessorFactory
-
Wraps the given java.lang.reflect method into a reflexion MethodAccessor wrapper.
- wrappedClass - Variable in class dev.derklaro.reflexion.Reflexion
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form