| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| private static final String | |
| public static final String | |
| public static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| private static void | addChildNodes(AsmManager asm, ResolvedType aspect, IProgramElement parent, ResolvedMember[] children)
|
| private static void | |
| public static void | addDeclareAnnotationFieldRelationship(AsmManager model, ISourceLocation declareLocation, String affectedTypeName, ResolvedMember affectedFieldName, boolean isRemove)
Add a relationship for a matching declare ATfield. |
| public static void | addDeclareAnnotationMethodRelationship(ISourceLocation sourceLocation, String affectedTypeName, ResolvedMember affectedMethod, AsmManager model)
Add a relationship for a matching declare annotation method or declare annotation constructor. |
| public static void | addDeclareAnnotationRelationship(AsmManager model, ISourceLocation declareAnnotationLocation, ISourceLocation annotatedLocation, boolean isRemove)
Adds a declare annotation relationship, sometimes entities don't have source locs (methods/fields) so use other variants of this method if that is the case as they will look the entities up in the structure model. |
| public static void | addDeclareErrorOrWarningRelationship(AsmManager model, Shadow affectedShadow, Checker deow)
Add a relationship for a declare error or declare warning |
| private static void | addPointcuts(AsmManager model, String sourcefilename, ResolvedType aspect, IProgramElement containingAspect, ResolvedMember[] pointcuts)
|
| public static void | addRelationship(AsmManager model, ResolvedType onType, ResolvedTypeMunger typeTransformer, ResolvedType originatingAspect)
Add a relationship for a type transformation (declare parents, intertype method declaration, declare annotation on type). |
| private static IProgramElement | |
| private static IProgramElement | createDeclareErrorOrWarningChild(AsmManager model, ResolvedType aspect, DeclareErrorOrWarning decl, int count)
|
| private static IProgramElement | |
| public static IProgramElement | |
| private static void | createHierarchy(AsmManager model, ResolvedTypeMunger typeTransformer, ResolvedType aspect)
Create a basic hierarchy to represent an aspect only available in binary (from the aspectpath). |
| public static void | createHierarchyForBinaryAspect(AsmManager asm, ShadowMunger munger)
Creates the hierarchy for binary aspects |
| private static IProgramElement | createIntertypeDeclaredChild(AsmManager model, ResolvedType aspect, BcelTypeMunger itd)
Half baked implementation - will need completing if we go down this route rather than replacing it all for binary aspects. |
| private static ISourceLocation | |
| private static IProgramElement | findOrCreateCodeNode(AsmManager asm, IProgramElement enclosingNode, Member shadowSig, Shadow shadow)
Finds or creates a code IProgramElement for the given shadow. |
| private static String | |
| private static File | getBinaryFile(ResolvedType aspect)
Returns the File with pathname to the class file, for example either C:\temp \ajcSandbox\workspace\ajcTest16957.tmp\simple.jar!pkg\BinaryAspect.class if the class file is in a jar file, or C:\temp\ajcSandbox\workspace\ajcTest16957.tmp!pkg\BinaryAspect.class if the class file is in a directory |
| private static ISourceLocation | getBinarySourceLocation(ResolvedType aspect, ISourceLocation sl)
Returns the binarySourceLocation for the given sourcelocation. |
| public static String | |
| protected static IProgramElement | |
| private static String | |
| private static boolean | |
| private static boolean | |
| private static IProgramElement | |
| private static void | |
| private static void | |
| private static boolean |
| ADVISED_BY | back to summary |
|---|---|
| public static final String ADVISED_BY | |
| ADVISES | back to summary |
|---|---|
| public static final String ADVISES | |
| ANNOTATED_BY | back to summary |
|---|---|
| public static final String ANNOTATED_BY | |
| ANNOTATES | back to summary |
|---|---|
| public static final String ANNOTATES | |
| DECLAREDY_BY | back to summary |
|---|---|
| public static final String DECLAREDY_BY | |
| DECLARES_ON | back to summary |
|---|---|
| public static final String DECLARES_ON | |
| INTER_TYPE_DECLARED_BY | back to summary |
|---|---|
| public static final String INTER_TYPE_DECLARED_BY | |
| INTER_TYPE_DECLARES | back to summary |
|---|---|
| public static final String INTER_TYPE_DECLARES | |
| MATCHED_BY | back to summary |
|---|---|
| public static final String MATCHED_BY | |
| MATCHES_DECLARE | back to summary |
|---|---|
| public static final String MATCHES_DECLARE | |
| NO_COMMENT | back to summary |
|---|---|
| private static final String NO_COMMENT | |
| SOFTENED_BY | back to summary |
|---|---|
| public static final String SOFTENED_BY | |
| SOFTENS | back to summary |
|---|---|
| public static final String SOFTENS | |
| AsmRelationshipProvider | back to summary |
|---|---|
| public AsmRelationshipProvider() | |
| addAdvisedRelationship | back to summary |
|---|---|
| public static void addAdvisedRelationship(AsmManager model, Shadow matchedShadow, ShadowMunger munger) | |
| addChildNodes | back to summary |
|---|---|
| private static void addChildNodes(AsmManager asm, ResolvedType aspect, IProgramElement parent, ResolvedMember[] children) | |
| addChildNodes | back to summary |
|---|---|
| private static void addChildNodes(AsmManager asm, ResolvedType aspect, IProgramElement parent, Collection<?> children) | |
| addDeclareAnnotationFieldRelationship | back to summary |
|---|---|
| public static void addDeclareAnnotationFieldRelationship(AsmManager model, ISourceLocation declareLocation, String affectedTypeName, ResolvedMember affectedFieldName, boolean isRemove) Add a relationship for a matching declare ATfield. Locating the field is trickier than it might seem since we have no line number info for it, we have to dig through the structure model under the fields' type in order to locate it. | |
| addDeclareAnnotationMethodRelationship | back to summary |
|---|---|
| public static void addDeclareAnnotationMethodRelationship(ISourceLocation sourceLocation, String affectedTypeName, ResolvedMember affectedMethod, AsmManager model) Add a relationship for a matching declare annotation method or declare annotation constructor. Locating the method is a messy (for messy read 'fragile') bit of code that could break at any moment but it's working for my simple testcase. | |
| addDeclareAnnotationRelationship | back to summary |
|---|---|
| public static void addDeclareAnnotationRelationship(AsmManager model, ISourceLocation declareAnnotationLocation, ISourceLocation annotatedLocation, boolean isRemove) Adds a declare annotation relationship, sometimes entities don't have source locs (methods/fields) so use other variants of this method if that is the case as they will look the entities up in the structure model. | |
| addDeclareErrorOrWarningRelationship | back to summary |
|---|---|
| public static void addDeclareErrorOrWarningRelationship(AsmManager model, Shadow affectedShadow, Checker deow) Add a relationship for a declare error or declare warning | |
| addPointcuts | back to summary |
|---|---|
| private static void addPointcuts(AsmManager model, String sourcefilename, ResolvedType aspect, IProgramElement containingAspect, ResolvedMember[] pointcuts) | |
| addRelationship | back to summary |
|---|---|
| public static void addRelationship(AsmManager model, ResolvedType onType, ResolvedTypeMunger typeTransformer, ResolvedType originatingAspect) Add a relationship for a type transformation (declare parents, intertype method declaration, declare annotation on type). | |
| createAdviceChild | back to summary |
|---|---|
| private static IProgramElement createAdviceChild(AsmManager model, Advice advice) | |
| createDeclareErrorOrWarningChild | back to summary |
|---|---|
| private static IProgramElement createDeclareErrorOrWarningChild(AsmManager model, ResolvedType aspect, DeclareErrorOrWarning decl, int count) | |
| createDeclareParentsChild | back to summary |
|---|---|
| private static IProgramElement createDeclareParentsChild(AsmManager model, DeclareParents decp) | |
| createFileStructureNode | back to summary |
|---|---|
| public static IProgramElement createFileStructureNode(AsmManager asm, String sourceFilePath) | |
| createHierarchy | back to summary |
|---|---|
| private static void createHierarchy(AsmManager model, ResolvedTypeMunger typeTransformer, ResolvedType aspect) Create a basic hierarchy to represent an aspect only available in binary (from the aspectpath). | |
| createHierarchyForBinaryAspect | back to summary |
|---|---|
| public static void createHierarchyForBinaryAspect(AsmManager asm, ShadowMunger munger) Creates the hierarchy for binary aspects | |
| createIntertypeDeclaredChild | back to summary |
|---|---|
| private static IProgramElement createIntertypeDeclaredChild(AsmManager model, ResolvedType aspect, BcelTypeMunger itd) Half baked implementation - will need completing if we go down this route rather than replacing it all for binary aspects. Doesn't attempt to get parameter names correct - they may have been lost during (de)serialization of the munger, but the member could still be located so they might be retrievable. | |
| createSourceLocation | back to summary |
|---|---|
| private static ISourceLocation createSourceLocation(String sourcefilename, ResolvedType aspect, ISourceLocation sl) | |
| findOrCreateCodeNode | back to summary |
|---|---|
| private static IProgramElement findOrCreateCodeNode(AsmManager asm, IProgramElement enclosingNode, Member shadowSig, Shadow shadow) Finds or creates a code IProgramElement for the given shadow. The byteCodeName of the created node is set to 'shadowSig.getName() + "!" + counter', eg "println!3". The counter is the occurence count of children within the enclosingNode which have the same name. So, for example, if a method contains two System.out.println statements, the first one will have byteCodeName 'println!1' and the second will have byteCodeName 'println!2'. This is to ensure the two nodes have unique handles when the handles do not depend on sourcelocations. Currently the shadows are examined in the sequence they appear in the source file. This means that the counters are consistent over incremental builds. All aspects are compiled up front and any new aspect created will force a full build. Moreover, if the body of the enclosingShadow is changed, then the model for this is rebuilt from scratch. | |
| findOrFakeUpNode | back to summary |
|---|---|
| private static String findOrFakeUpNode(AsmManager model, ResolvedType onType) | |
| getBinaryFile | back to summary |
|---|---|
| private static File getBinaryFile(ResolvedType aspect) Returns the File with pathname to the class file, for example either C:\temp \ajcSandbox\workspace\ajcTest16957.tmp\simple.jar!pkg\BinaryAspect.class if the class file is in a jar file, or C:\temp\ajcSandbox\workspace\ajcTest16957.tmp!pkg\BinaryAspect.class if the class file is in a directory | |
| getBinarySourceLocation | back to summary |
|---|---|
| private static ISourceLocation getBinarySourceLocation(ResolvedType aspect, ISourceLocation sl) Returns the binarySourceLocation for the given sourcelocation. This isn't cached because it's used when faulting in the binary nodes and is called with ISourceLocations for all advice, pointcuts and deows contained within the resolvedDeclaringAspect. | |
| getHandle | back to summary |
|---|---|
| public static String getHandle(AsmManager asm, Advice advice) | |
| getNode | back to summary |
|---|---|
| protected static IProgramElement getNode(AsmManager model, Shadow shadow) | |
| getSourceFileName | back to summary |
|---|---|
| private static String getSourceFileName(ResolvedType aspect) | |
| isBinaryAspect | back to summary |
|---|---|
| private static boolean isBinaryAspect(ResolvedType aspect) | |
| isMixinRelated | back to summary |
|---|---|
| private static boolean isMixinRelated(ResolvedTypeMunger typeTransformer) | |
| lookupMember | back to summary |
|---|---|
| private static IProgramElement lookupMember(IHierarchy model, UnresolvedType declaringType, Member member) | |
| setParams | back to summary |
|---|---|
| private static void setParams(IProgramElement pe, ResolvedMember sig) | |
| setParentTypesOnDeclareParentsNode | back to summary |
|---|---|
| private static void setParentTypesOnDeclareParentsNode(DeclareParents decp, IProgramElement decpElement) | |
| sourceLinesMatch | back to summary |
|---|---|
| private static boolean sourceLinesMatch(ISourceLocation location1, ISourceLocation location2) | |