org.aspectj.weaver
Class ResolvedTypeMunger
java.lang.Object
org.aspectj.weaver.ResolvedTypeMunger
- Direct Known Subclasses:
- AnnotationOnTypeMunger, MethodDelegateTypeMunger, MethodDelegateTypeMunger.FieldHostTypeMunger, NewConstructorTypeMunger, NewFieldTypeMunger, NewMemberClassTypeMunger, NewMethodTypeMunger, NewParentTypeMunger, PerObjectInterfaceTypeMunger, PerTypeWithinTargetTypeMunger, PrivilegedAccessMunger
public abstract class ResolvedTypeMunger
- extends java.lang.Object
This is an abstraction over method/field introduction. It might not have the chops to handle other inter-type declarations. This
is the thing that is used on the eclipse side and serialized into a ConcreteTypeMunger.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field
public static final ResolvedTypeMunger.Kind Field
Method
public static final ResolvedTypeMunger.Kind Method
Constructor
public static final ResolvedTypeMunger.Kind Constructor
PerObjectInterface
public static final ResolvedTypeMunger.Kind PerObjectInterface
PrivilegedAccess
public static final ResolvedTypeMunger.Kind PrivilegedAccess
Parent
public static final ResolvedTypeMunger.Kind Parent
PerTypeWithinInterface
public static final ResolvedTypeMunger.Kind PerTypeWithinInterface
AnnotationOnType
public static final ResolvedTypeMunger.Kind AnnotationOnType
MethodDelegate
public static final ResolvedTypeMunger.Kind MethodDelegate
FieldHost
public static final ResolvedTypeMunger.Kind FieldHost
MethodDelegate2
public static final ResolvedTypeMunger.Kind MethodDelegate2
InnerClass
public static final ResolvedTypeMunger.Kind InnerClass
SUPER_DISPATCH_NAME
public static final java.lang.String SUPER_DISPATCH_NAME
- See Also:
- Constant Field Values
ResolvedTypeMunger
public ResolvedTypeMunger(ResolvedTypeMunger.Kind kind,
ResolvedMember signature)
setSourceLocation
public void setSourceLocation(ISourceLocation isl)
getSourceLocation
public ISourceLocation getSourceLocation()
matches
public boolean matches(ResolvedType matchType,
ResolvedType aspectType)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
read
public static ResolvedTypeMunger read(VersionedDataInputStream s,
ISourceContext context)
throws java.io.IOException
- Throws:
java.io.IOException
write
public abstract void write(CompressingDataOutputStream s)
throws java.io.IOException
- Throws:
java.io.IOException
getKind
public ResolvedTypeMunger.Kind getKind()
setSuperMethodsCalled
public void setSuperMethodsCalled(java.util.Set<ResolvedMember> c)
getSuperMethodsCalled
public java.util.Set<ResolvedMember> getSuperMethodsCalled()
getSignature
public ResolvedMember getSignature()
getMatchingSyntheticMember
public ResolvedMember getMatchingSyntheticMember(Member member,
ResolvedType aspectType)
changesPublicSignature
public boolean changesPublicSignature()
needsAccessToTopmostImplementor
public boolean needsAccessToTopmostImplementor()
getTypeVariableAliases
public java.util.List<java.lang.String> getTypeVariableAliases()
hasTypeVariableAliases
public boolean hasTypeVariableAliases()
sharesTypeVariablesWithGenericType
public boolean sharesTypeVariablesWithGenericType()
- return true if type variables are specified with the target type for this ITD. e.g. this would return true:
"int I.m() { return 42; }"
parameterizedFor
public ResolvedTypeMunger parameterizedFor(ResolvedType target)
- Parameterizes a resolved type munger for a particular usage of its target type (this is used when the target type is generic
and the ITD shares type variables with the target) see ConcreteTypeMunger.parameterizedFor
setDeclaredSignature
public void setDeclaredSignature(ResolvedMember rm)
getDeclaredSignature
public ResolvedMember getDeclaredSignature()
isLateMunger
public boolean isLateMunger()
- A late munger has to be done after shadow munging since which shadows are matched can affect the operation of the late
munger. e.g. perobjectinterfacemunger
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.
parameterizeWith
public ResolvedTypeMunger parameterizeWith(java.util.Map<java.lang.String,UnresolvedType> m,
World w)
getDeclaringType
public UnresolvedType getDeclaringType()