Package org.aspectj.weaver
Class ConcreteTypeMunger
java.lang.Object
org.aspectj.weaver.ConcreteTypeMunger
- All Implemented Interfaces:
PartialOrder.PartialComparable
- Direct Known Subclasses:
BcelTypeMunger
,TemporaryTypeMunger
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
equivalentTo
(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
Some type mungers are created purely to help with the implementation of shadow mungers.int
fallbackCompareTo
(Object other) This method can provide a deterministic ordering for elements that are strictly not comparable.getMatchingSyntheticMember
(Member member) returns null for mungers that are used internally, but were not part of a declared thing in source code.getWorld()
boolean
boolean
returns true if the ITD target type used type variables, for example I<T>.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
(Map<String, UnresolvedType> parameterizationMap, World world) boolean
-
Field Details
-
munger
-
aspectType
-
-
Constructor Details
-
ConcreteTypeMunger
-
-
Method Details
-
equivalentTo
Equivalence can be true for an EclipseTypeMunger and a BcelTypeMunger that represent the same transformation (just at different points in the pipeline). -
getMunger
returns null for mungers that are used internally, but were not part of a declared thing in source code. -
getAspectType
-
getSignature
-
getWorld
-
getSourceLocation
-
matches
-
getMatchingSyntheticMember
-
compareTo
- Specified by:
compareTo
in interfacePartialOrder.PartialComparable
- Returns:
- +1 if this is greater than other
- -1 if this is less than other
- 0 if this is not comparable to other
-
fallbackCompareTo
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 interfacePartialOrder.PartialComparable
-
isTargetTypeParameterized
public boolean isTargetTypeParameterized()returns true if the ITD target type used type variables, for example I<T>. 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:
In this case the munger matches X but it matches with the forminterface I<T> {} aspect X implements I<String> { List<T> I<T>.foo { return null; } }
List<String> foo() { return null; }
-
parameterizedFor
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(Map<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()
-