public class WrapperTransformer extends Object
String
array passed to WrapperTransformer constructor.
There must be a WrapperTransformer instance for each transformer. That
means that when we talk about transformation types available to a class member, we mean
the member associated with the transformer (for exemple, in the case of
ConstructorExecutionTransformer, the member is a constructor).| Modifier and Type | Field and Description |
|---|---|
protected static String[] |
SINGLE_TRANSFORMATION
May be used as the
transformations array in the constructor, if a class
member will be affected by only one type of transformation. |
protected static int |
SINGLE_TRANSFORMATION_INDEX
Index that identifies the single transformation contained in
SINGLE_TRANSFORMATION. |
| Constructor and Description |
|---|
WrapperTransformer(String[] transformations)
Creates a wrapper transformer.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isNotPrepared(javassist.CtMember member,
int transformationIndex)
Checks if the joinpoint is not prepared.
|
boolean |
isWrapped(javassist.CtMember member,
int transformationIndex)
Checks if the joinpoint is wrapped.
|
void |
prepareForWrapping(javassist.CtMember member,
int transformationIndex)
Prepares the joinpoint for wrapping.
|
void |
unwrap(javassist.CtMember member,
int transformationIndex)
Unwraps the joinpoint.
|
void |
wrap(javassist.CtMember member,
int transformationIndex)
Wraps the joinpoint.
|
protected static final String[] SINGLE_TRANSFORMATION
transformations array in the constructor, if a class
member will be affected by only one type of transformation. In this case, a joinpoint
can be identified only by a class member.protected static final int SINGLE_TRANSFORMATION_INDEX
SINGLE_TRANSFORMATION.
If SINGLE_TRANSFORMATION was passed as the transformations
argument to the constructor, this variable has to be used as the transformation index value
in the WrapperTransformer methods calls.public WrapperTransformer(String[] transformations)
transformations - list of all transformations that may be applied
to a joinpoint. It may be SINGLE_TRANSFORMATION if
a class member will be affected by only one type of transformation (i. e. if
a joinpont can be identified only by the class member).public void prepareForWrapping(javassist.CtMember member,
int transformationIndex)
member - the member associated with the joinpoint.transformationIndex - index of the transformation text which, along with
member, identifies the joinpoint to be prepared.public void wrap(javassist.CtMember member,
int transformationIndex)
member - the member associated with the joinpoint.transformationIndex - index of the transformation text which, along with
member, identifies the joinpoint to be wrapped.public void unwrap(javassist.CtMember member,
int transformationIndex)
member - the member associated with the joinpoint.transformationIndex - index of the transformation text which, along with
member, identifies the joinpoint to be unwrapped.public boolean isNotPrepared(javassist.CtMember member,
int transformationIndex)
member - the member associated with the joinpoint.transformationIndex - index of the transformation text which, along with
member, identifies the joinpoint whose status will be checked.public boolean isWrapped(javassist.CtMember member,
int transformationIndex)
member - the member associated with the joinpoint.transformationIndex - index of the transformation text which, along with
member, identifies the joinpoint whose status will be checked.Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.