Package org.jboss.byteman.agent
Interface AccessEnabler
- All Known Implementing Classes:
DefaultAccessEnabler
,JigsawAccessEnabler
public interface AccessEnabler
interface encapsulating behaviour required both to check
for the need to access a member reflectively and to ensure
that the member can be so used.
-
Method Summary
Modifier and TypeMethodDescriptioncreateConstructorInvoker
(Constructor constructor) createFieldGetter
(Field field) createFieldSetter
(Field field) createMethodInvoker
(Method method) void
ensureAccess
(AccessibleObject accessible) ensure that accessible can be accessed using reflection or a method handleboolean
requiresAccess
(Class<?> klazz) test whether reference to the class from a classpath class requires the use of reflection or a method handle and possibly also module jiggery-pokery.boolean
requiresAccess
(AccessibleObject accessible) test whether access to the accessible from a classpath class requires the use of reflection or a method handle and possibly also module jiggery-pokery.
-
Method Details
-
requiresAccess
test whether reference to the class from a classpath class requires the use of reflection or a method handle and possibly also module jiggery-pokery.- Parameters:
klazz
- the clas to be checked- Returns:
- true if reference to the class from a classpath class requires the use of reflection or a method handle and possibly module jiggery-pokery otherwise false.
-
requiresAccess
test whether access to the accessible from a classpath class requires the use of reflection or a method handle and possibly also module jiggery-pokery.- Parameters:
accessible
- this must be a Member- Returns:
- true if access requires reflection or a method handle and possibly also module jiggery-pokery otherwise false.
-
ensureAccess
ensure that accessible can be accessed using reflection or a method handle- Parameters:
accessible
- this must be a Member
-
createMethodInvoker
-
createConstructorInvoker
-
createFieldGetter
-
createFieldSetter
-