public class PrivateAccessUtil extends Object
Constructor and Description |
---|
PrivateAccessUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addPrivateAccessStubs(PrivateAccessType accessType,
String type,
ClassStructureBuilder<?> classBuilder,
MetaField f)
Generates methods for accessing a private field using either JSNI or Java
Reflection.
|
static void |
addPrivateAccessStubs(PrivateAccessType accessType,
String accessorType,
ClassStructureBuilder<?> classBuilder,
MetaField f,
Modifier[] modifiers)
Generates methods for accessing a private field using either JSNI or Java
Reflection.
|
static void |
addPrivateAccessStubs(String accessorType,
ClassStructureBuilder<?> classBuilder,
MetaConstructor m)
Generates methods for accessing a nonpublic constructor using either JSNI or
Java Reflection.
|
static void |
addPrivateAccessStubs(String type,
ClassStructureBuilder<?> classBuilder,
MetaField f) |
static void |
addPrivateAccessStubs(String accessorType,
ClassStructureBuilder<?> classBuilder,
MetaMethod m)
Generates methods for accessing a nonpublic method using either JSNI or
Java Reflection.
|
static void |
addPrivateAccessStubs(String accessorType,
ClassStructureBuilder<?> classBuilder,
MetaMethod m,
Modifier[] modifiers)
Generates methods for accessing a nonpublic method using either JSNI or Java
Reflection.
|
static String |
condensify(String packagePrefix) |
static String |
getPrivateFieldInjectorName(MetaField field) |
static String |
getPrivateMethodName(MetaMethod method) |
static void |
registerPrivateMemberAccessor(String type,
PrivateMemberAccessor accessor) |
public static void registerPrivateMemberAccessor(String type, PrivateMemberAccessor accessor)
public static void addPrivateAccessStubs(String type, ClassStructureBuilder<?> classBuilder, MetaField f)
public static void addPrivateAccessStubs(PrivateAccessType accessType, String type, ClassStructureBuilder<?> classBuilder, MetaField f)
accessType
- Whether to generate a read method, a write method, or both.type
- The type of accessors to use (ie. "reflection" or "jsni").classBuilder
- The class builder to add the generated methods to.f
- The field the generated accessors read and write.public static void addPrivateAccessStubs(PrivateAccessType accessType, String accessorType, ClassStructureBuilder<?> classBuilder, MetaField f, Modifier[] modifiers)
accessType
- Whether to generate a read method, a write method, or both.accessorType
- The type of accessors to use (ie. "reflection" or "jsni").classBuilder
- The class builder to add the generated methods to.f
- The field the generated accessors read and write.modifiers
- The modifiers on the generated method, for example
Modifier.Final
or Modifier.Synchronized
. Never
specify Modifier.JSNI
; it is added automatically when
needed.public static void addPrivateAccessStubs(String accessorType, ClassStructureBuilder<?> classBuilder, MetaConstructor m)
getPrivateMethodName(MetaMethod)
.accessorType
- The type of accessors to use (ie. "reflection" or "jsni").classBuilder
- The class builder to add the generated method to.m
- The constructor the generated method will invokepublic static void addPrivateAccessStubs(String accessorType, ClassStructureBuilder<?> classBuilder, MetaMethod m)
getPrivateMethodName(MetaMethod)
.accessorType
- The type of accessors to use (ie. "reflection" or "jsni").classBuilder
- The class builder to add the generated method to.m
- The nonpublic method the generated method will invokepublic static void addPrivateAccessStubs(String accessorType, ClassStructureBuilder<?> classBuilder, MetaMethod m, Modifier[] modifiers)
accessorType
- The type of accessors to use (ie. "reflection" or "jsni").classBuilder
- The class builder to add the generated method to.m
- The method the generated accessors read and write.modifiers
- The modifiers on the generated method, for example
Modifier.Final
or Modifier.Synchronized
. Never
specify Modifier.JSNI
; it is added automatically when
needed.public static String getPrivateMethodName(MetaMethod method)
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.