org.aspectj.weaver.model
Class AsmRelationshipProvider

java.lang.Object
  extended by org.aspectj.weaver.model.AsmRelationshipProvider

public class AsmRelationshipProvider
extends java.lang.Object


Field Summary
static java.lang.String ADVISED_BY
           
static java.lang.String ADVISES
           
static java.lang.String ANNOTATED_BY
           
static java.lang.String ANNOTATES
           
static java.lang.String DECLAREDY_BY
           
static java.lang.String DECLARES_ON
           
static java.lang.String INTER_TYPE_DECLARED_BY
           
static java.lang.String INTER_TYPE_DECLARES
           
static java.lang.String MATCHED_BY
           
static java.lang.String MATCHES_DECLARE
           
static java.lang.String SOFTENED_BY
           
static java.lang.String SOFTENS
           
 
Constructor Summary
AsmRelationshipProvider()
           
 
Method Summary
static void addAdvisedRelationship(AsmManager model, Shadow matchedShadow, ShadowMunger munger)
           
static void addDeclareAnnotationFieldRelationship(AsmManager model, ISourceLocation declareLocation, java.lang.String affectedTypeName, ResolvedMember affectedFieldName, boolean isRemove)
          Add a relationship for a matching declare ATfield.
static void addDeclareAnnotationMethodRelationship(ISourceLocation sourceLocation, java.lang.String affectedTypeName, ResolvedMember affectedMethod, AsmManager model)
          Add a relationship for a matching declare annotation method or declare annotation constructor.
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.
static void addDeclareErrorOrWarningRelationship(AsmManager model, Shadow affectedShadow, Checker deow)
          Add a relationship for a declare error or declare warning
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).
static IProgramElement createFileStructureNode(AsmManager asm, java.lang.String sourceFilePath)
           
static void createHierarchyForBinaryAspect(AsmManager asm, ShadowMunger munger)
          Creates the hierarchy for binary aspects
static java.lang.String getHandle(AsmManager asm, Advice advice)
           
protected static IProgramElement getNode(AsmManager model, Shadow shadow)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADVISES

public static final java.lang.String ADVISES
See Also:
Constant Field Values

ADVISED_BY

public static final java.lang.String ADVISED_BY
See Also:
Constant Field Values

DECLARES_ON

public static final java.lang.String DECLARES_ON
See Also:
Constant Field Values

DECLAREDY_BY

public static final java.lang.String DECLAREDY_BY
See Also:
Constant Field Values

SOFTENS

public static final java.lang.String SOFTENS
See Also:
Constant Field Values

SOFTENED_BY

public static final java.lang.String SOFTENED_BY
See Also:
Constant Field Values

MATCHED_BY

public static final java.lang.String MATCHED_BY
See Also:
Constant Field Values

MATCHES_DECLARE

public static final java.lang.String MATCHES_DECLARE
See Also:
Constant Field Values

INTER_TYPE_DECLARES

public static final java.lang.String INTER_TYPE_DECLARES
See Also:
Constant Field Values

INTER_TYPE_DECLARED_BY

public static final java.lang.String INTER_TYPE_DECLARED_BY
See Also:
Constant Field Values

ANNOTATES

public static final java.lang.String ANNOTATES
See Also:
Constant Field Values

ANNOTATED_BY

public static final java.lang.String ANNOTATED_BY
See Also:
Constant Field Values
Constructor Detail

AsmRelationshipProvider

public AsmRelationshipProvider()
Method Detail

addDeclareErrorOrWarningRelationship

public static void addDeclareErrorOrWarningRelationship(AsmManager model,
                                                        Shadow affectedShadow,
                                                        Checker deow)
Add a relationship for a declare error or declare warning


addRelationship

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).


createFileStructureNode

public static IProgramElement createFileStructureNode(AsmManager asm,
                                                      java.lang.String sourceFilePath)

addDeclareAnnotationRelationship

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.


createHierarchyForBinaryAspect

public static void createHierarchyForBinaryAspect(AsmManager asm,
                                                  ShadowMunger munger)
Creates the hierarchy for binary aspects


getHandle

public static java.lang.String getHandle(AsmManager asm,
                                         Advice advice)

addAdvisedRelationship

public static void addAdvisedRelationship(AsmManager model,
                                          Shadow matchedShadow,
                                          ShadowMunger munger)

getNode

protected static IProgramElement getNode(AsmManager model,
                                         Shadow shadow)

addDeclareAnnotationMethodRelationship

public static void addDeclareAnnotationMethodRelationship(ISourceLocation sourceLocation,
                                                          java.lang.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.


addDeclareAnnotationFieldRelationship

public static void addDeclareAnnotationFieldRelationship(AsmManager model,
                                                         ISourceLocation declareLocation,
                                                         java.lang.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.