| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private final Set | |
| private final List | |
| private final Map | |
| private List | |
| private final List | |
| private boolean | |
| private static boolean | |
| private static boolean | |
| private final LazyClassGen | |
| private final ConstantPool | |
| private final InstructionFactory | |
| private List | |
| private final List | initializationShadows
This holds the initialization and pre-initialization shadows for this class that were actually matched by mungers (if no match, then we don't even create the shadows really). |
| private boolean | |
| private final List | |
| private final Map | |
| private final List | |
| private static final String | |
| private static Trace | |
| private final BcelObjectType | |
| private final List | |
| private final BcelWorld |
| Access | Constructor and Description |
|---|---|
| private | BcelClassWeaver(BcelWorld world, LazyClassGen clazz, List<ShadowMunger> shadowMungers, List<ConcreteTypeMunger> typeMungers, List<ConcreteTypeMunger> lateTypeMungers)
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public void | |
| public void | |
| public void | |
| private boolean | |
| private boolean | |
| public static boolean | calculateAnyRequiredBridgeMethods(BcelWorld world, LazyClassGen clazz)
We need to determine if any methods in this type require bridge methods - this method should only be called if necessary to do this calculation, i.e. we are on a 1.5 VM (where covariance/generics exist) and the type hierarchy for the specified class has changed (via decp/itd). |
| private boolean | |
| public static void | Returns: the method being overridden or null if none is foundThis method recurses up a specified type looking for a method that overrides the one passed in. |
| private void | checkUnusedDeclareAts(Set<DeclareAnnotation> unusedDecaTs, boolean isDeclareAtField)
Report an error if the reason a "declare @method/ctor/field" was not used was because the member specified does not exist. |
| private static void | createBridgeMethod(BcelWorld world, LazyMethodGen whatToBridgeToMethodGen, LazyClassGen clazz, ResolvedMember theBridgeMethod)
Create a single bridge method called 'theBridgeMethod' that bridges to 'whatToBridgeTo' |
| private boolean | doesAlreadyHaveAnnotation(ResolvedMember rm, DeclareAnnotation deca, List<Integer> reportedProblems, boolean reportError)
Check if a resolved member (field/method/ctor) already has an annotation, if it does then put out a warning and return true |
| private boolean | doesAlreadyHaveAnnotation(LazyMethodGen rm, ResolvedMember itdfieldsig, DeclareAnnotation deca, List<Integer> reportedProblems)
|
| private boolean | |
| private Set | |
| private ResolvedMember | findResolvedMemberNamed(ResolvedType type, String methodName)
For some named resolved type, this method looks for a member with a particular name - it should only be used when you truly believe there is only one member with that name in the type as it returns the first one it finds. |
| private ResolvedMember | findResolvedMemberNamed(ResolvedType
the type to search for the member type, String the name of the method to find methodName, UnresolvedType[] the method parameters that the discovered method should have params)Find the specified member in the specified type. |
| private InstructionHandle | findSuperOrThisCall(LazyMethodGen mg)
Returns null if this is not a Java constructor, and then we won't weave into it at all |
| private void | fixAnnotationsForResolvedMember(ResolvedMember
the sig we want it to pretend to be 'int A.m()' or somesuch ITD like thing rm, ResolvedMember the real sig 'blah.ajc$xxx' declaredSig)For a given resolvedmember, this will discover the real annotations for it. |
| private void | fixParameterNamesForResolvedMember(ResolvedMember
the sig we want it to pretend to be 'int A.m()' or somesuch ITD like thing rm, ResolvedMember the real sig 'blah.ajc$xxx' declaredSig)For a given resolvedmember, this will discover the real annotations for it. |
| private static InstructionList | genArgumentStores(LazyMethodGen
the method we will inline from. Used to get the signature. donor, LazyMethodGen the method we will inline into. Used to get the frame size so we can allocate fresh locations. recipient, IntMap an empty environment we populate with a map from donor frame to recipient frame. frameEnv, InstructionFactory an instruction factory for recipient fact)generate the argument stores in preparation for inlining. |
| private InstructionList | genInitInstructions(List<ConcreteTypeMunger> list, boolean isStatic)
first sorts the mungers, then gens the initializers in the right order |
| pack-priv static InstructionList | genInlineInstructions(LazyMethodGen
the method from which we will copy (and adjust frame and jumps) instructions. donor, LazyMethodGen the method the instructions will go into. Used to get the frame size so we can allocate new frame locations
for locals in donor. recipient, IntMap an environment to map from donor frame to recipient frame, initially populated with argument locations. frameEnv, InstructionFactory an instruction factory for recipient fact, boolean keepReturns)generate the instructions to be inlined. |
| private LazyMethodGen | getCalledMethod(InstructionHandle
The InvokeInstruction instructionHandle pointing to the called method. ih)get a called method: Assumes the called method is in this class, and the reference to it is exact (a la INVOKESPECIAL). |
| private List | getITDSubset(LazyClassGen clazz, ResolvedTypeMunger.
Get a subset of all the type mungers defined on this aspect |
| public LazyClassGen | |
| private List | getMatchingSubset(List<DeclareAnnotation> declareAnnotations, ResolvedType type)
Looks through a list of declare annotation statements and only returns those that could possibly match on a field/method/ctor in type. |
| public boolean | |
| public BcelWorld | |
| private void | |
| private void | indexShadowMungers()
Process the shadow mungers into array 'buckets', each bucket represents a shadow kind and contains a list of shadowmungers that could potentially apply at that shadow kind. |
| private void | |
| public static void | inlineMethod(LazyMethodGen
the method we want to inline donor, LazyMethodGen the method containing the call we want to inline recipient, InstructionHandle the instructionHandle in recipient's body holding the call we want to inline. call)inline a particular call in bytecode. |
| private boolean | |
| private boolean | |
| private static ResolvedMember | Returns: method that is overriding if itCheck if a particular method is overriding another - refactored into this helper so it can be used from multiple places. |
| private boolean | |
| pack-priv static boolean | Returns: true if there is an overrides rather than a 'hides' relationshipLooks at the visibility modifiers between two methods, and knows whether they are from classes in the same package, and decides whether one overrides the other. |
| public LazyMethodGen | |
| public LazyMethodGen | |
| protected static LazyMethodGen | |
| private boolean | |
| private void | match(LazyMethodGen mg, InstructionHandle ih, BcelShadow enclosingShadow, List<BcelShadow> shadowAccumulator)
|
| private boolean | |
| private void | matchGetInstruction(LazyMethodGen mg, InstructionHandle ih, BcelShadow enclosingShadow, List<BcelShadow> shadowAccumulator)
|
| private boolean | |
| private void | matchInvokeInstruction(LazyMethodGen mg, InstructionHandle ih, InvokeInstruction invoke, BcelShadow enclosingShadow, List<BcelShadow> shadowAccumulator)
|
| private void | matchSetInstruction(LazyMethodGen mg, InstructionHandle ih, BcelShadow enclosingShadow, List<BcelShadow> shadowAccumulator)
|
| private void | |
| private void | |
| private AnnotationAJ[] | removeFromAnnotationsArray(AnnotationAJ[] annotations, AnnotationAJ annotation)
Remove an annotation from the supplied array, if it is in there. |
| private void | reportFieldAnnotationWeavingMessage(LazyClassGen clazz, BcelField theField, DeclareAnnotation decaf, boolean isRemove)
|
| private void | reportMethodCtorWeavingMessage(LazyClassGen clazz, ResolvedMember member, DeclareAnnotation decaM, int memberLineNumber)
|
| public void | |
| private boolean | |
| private boolean | |
| public String | |
| public static void | transformSynchronizedMethod(LazyMethodGen synchronizedMethod)
Input method is a synchronized method, we remove the bit flag for synchronized and then insert a try..finally block Some jumping through firey hoops required - depending on the input code level (1.5 or not) we may or may not be able to use the LDC instruction that takes a class literal (doesnt on <1.5). |
| public static boolean | weave(BcelWorld world, LazyClassGen clazz, List<ShadowMunger> shadowMungers, List<ConcreteTypeMunger> typeMungers, List<ConcreteTypeMunger> lateTypeMungers, boolean inReweavableMode)
|
| public boolean | Returns: true if the class was modifiedImplements org. |
| private boolean | weaveAtFieldRepeatedly(List<DeclareAnnotation> decaFs, List<ConcreteTypeMunger> itdFields, List<Integer> reportedErrors)
Applies some set of declare @field constructs (List<declareannotation>) to some bunch of ITDfields (List<bceltypemunger>. |
| private boolean | weaveAtMethodOnITDSRepeatedly(List<DeclareAnnotation> decaMCs, List<ConcreteTypeMunger> itdsForMethodAndConstructor, List<Integer> reportedErrors)
Applies some set of declare @method/@ctor constructs (List<declareannotation>) to some bunch of ITDmembers (List<bceltypemunger>. |
| private boolean | weaveDeclareAtField(LazyClassGen clazz)
Weave any declare @field statements into the fields of the supplied class. |
| private boolean | weaveDeclareAtMethodCtor(LazyClassGen clazz)
Weave any declare @method/@ctor statements into the members of the supplied class |
| private void |