org.aspectj.weaver
Class ConcreteTypeMunger

java.lang.Object
  extended by org.aspectj.weaver.ConcreteTypeMunger
All Implemented Interfaces:
PartialOrder.PartialComparable
Direct Known Subclasses:
BcelTypeMunger, TemporaryTypeMunger

public abstract class ConcreteTypeMunger
extends java.lang.Object
implements PartialOrder.PartialComparable


Field Summary
protected  ResolvedType aspectType
           
protected  ResolvedTypeMunger munger
           
 
Constructor Summary
ConcreteTypeMunger(ResolvedTypeMunger munger, ResolvedType aspectType)
           
 
Method Summary
 int compareTo(java.lang.Object other)
           
 boolean equivalentTo(java.lang.Object other)
          Equivalence can be true for an EclipseTypeMunger and a BcelTypeMunger that represent the same transformation (just at different points in the pipeline).
 boolean existsToSupportShadowMunging()
          Some type mungers are created purely to help with the implementation of shadow mungers.
 int fallbackCompareTo(java.lang.Object other)
          This method can provide a deterministic ordering for elements that are strictly not comparable.
 ResolvedType getAspectType()
           
 ResolvedMember getMatchingSyntheticMember(Member member)
           
 ResolvedTypeMunger getMunger()
          returns null for mungers that are used internally, but were not part of a declared thing in source code.
 ResolvedMember getSignature()
           
 ISourceLocation getSourceLocation()
           
 World getWorld()
           
 boolean isLateMunger()
           
 boolean isTargetTypeParameterized()
          returns true if the ITD target type used type variables, for example I.
 boolean matches(ResolvedType onType)
           
abstract  ConcreteTypeMunger parameterizedFor(ResolvedType targetType)
          For an ITD made on a generic type that shares type variables with that target type, this method will tailor the ITD for a particular usage of the generic type - either in its raw or parameterized form.
abstract  ConcreteTypeMunger parameterizeWith(java.util.Map<java.lang.String,UnresolvedType> parameterizationMap, World world)
           
 boolean shouldOverwrite()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

munger

protected ResolvedTypeMunger munger

aspectType

protected ResolvedType aspectType
Constructor Detail

ConcreteTypeMunger

public ConcreteTypeMunger(ResolvedTypeMunger munger,
                          ResolvedType aspectType)
Method Detail

equivalentTo

public boolean equivalentTo(java.lang.Object other)
Equivalence can be true for an EclipseTypeMunger and a BcelTypeMunger that represent the same transformation (just at different points in the pipeline).


getMunger

public ResolvedTypeMunger getMunger()
returns null for mungers that are used internally, but were not part of a declared thing in source code.


getAspectType

public ResolvedType getAspectType()

getSignature

public ResolvedMember getSignature()

getWorld

public World getWorld()

getSourceLocation

public ISourceLocation getSourceLocation()

matches

public boolean matches(ResolvedType onType)

getMatchingSyntheticMember

public ResolvedMember getMatchingSyntheticMember(Member member)

compareTo

public int compareTo(java.lang.Object other)
Specified by:
compareTo in interface PartialOrder.PartialComparable

fallbackCompareTo

public int fallbackCompareTo(java.lang.Object other)
Description copied from interface: PartialOrder.PartialComparable
This method can provide a deterministic ordering for elements that are strictly not comparable. If you have no need for this, this method can just return 0 whenever called.

Specified by:
fallbackCompareTo in interface PartialOrder.PartialComparable

isTargetTypeParameterized

public boolean isTargetTypeParameterized()
returns true if the ITD target type used type variables, for example I. When they are specified like this, the ITDs 'share' type variables with the generic type. Usually this method is called because we need to know whether to tailor the munger for addition to a particular type. For example: interface I {} aspect X implements I { List I.foo { return null; } } In this case the munger matches X but it matches with the form List foo() { return null; }


parameterizedFor

public abstract ConcreteTypeMunger parameterizedFor(ResolvedType targetType)
For an ITD made on a generic type that shares type variables with that target type, this method will tailor the ITD for a particular usage of the generic type - either in its raw or parameterized form.


isLateMunger

public boolean isLateMunger()

parameterizeWith

public abstract ConcreteTypeMunger parameterizeWith(java.util.Map<java.lang.String,UnresolvedType> parameterizationMap,
                                                    World world)

existsToSupportShadowMunging

public boolean existsToSupportShadowMunging()
Some type mungers are created purely to help with the implementation of shadow mungers. For example to support the cflow() pointcut we create a new cflow field in the aspect, and that is added via a BcelCflowCounterFieldAdder. During compilation we need to compare sets of type mungers, and if some only come into existence after the 'shadowy' type things have been processed, we need to ignore them during the comparison. Returning true from this method indicates the type munger exists to support 'shadowy' stuff - and so can be ignored in some comparison.


shouldOverwrite

public boolean shouldOverwrite()