org.aspectj.weaver
Class ResolvedTypeMunger

java.lang.Object
  extended by 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.


Nested Class Summary
static class ResolvedTypeMunger.Kind
           
 
Field Summary
static ResolvedTypeMunger.Kind AnnotationOnType
           
static ResolvedTypeMunger.Kind Constructor
           
protected  ResolvedMember declaredSignature
          The declared signature is filled in when a type munger is parameterized for application to a particular type.
static ResolvedTypeMunger.Kind Field
           
static ResolvedTypeMunger.Kind FieldHost
           
static ResolvedTypeMunger.Kind InnerClass
           
protected  ResolvedTypeMunger.Kind kind
           
static ResolvedTypeMunger.Kind Method
           
static ResolvedTypeMunger.Kind MethodDelegate
           
static ResolvedTypeMunger.Kind MethodDelegate2
           
static ResolvedTypeMunger.Kind Parent
           
static ResolvedTypeMunger.Kind PerObjectInterface
           
static ResolvedTypeMunger.Kind PerTypeWithinInterface
           
static ResolvedTypeMunger.Kind PrivilegedAccess
           
protected  ResolvedMember signature
           
static java.lang.String SUPER_DISPATCH_NAME
           
protected  java.util.List<java.lang.String> typeVariableAliases
           
 
Constructor Summary
ResolvedTypeMunger(ResolvedTypeMunger.Kind kind, ResolvedMember signature)
           
 
Method Summary
 boolean changesPublicSignature()
           
 boolean existsToSupportShadowMunging()
          Some type mungers are created purely to help with the implementation of shadow mungers.
 ResolvedMember getDeclaredSignature()
           
 UnresolvedType getDeclaringType()
           
 ResolvedTypeMunger.Kind getKind()
           
 ResolvedMember getMatchingSyntheticMember(Member member, ResolvedType aspectType)
           
 ResolvedMember getSignature()
           
 ISourceLocation getSourceLocation()
           
 java.util.Set<ResolvedMember> getSuperMethodsCalled()
           
 java.util.List<java.lang.String> getTypeVariableAliases()
           
 boolean hasTypeVariableAliases()
           
 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.
 boolean matches(ResolvedType matchType, ResolvedType aspectType)
           
 boolean needsAccessToTopmostImplementor()
           
 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
 ResolvedTypeMunger parameterizeWith(java.util.Map<java.lang.String,UnresolvedType> m, World w)
           
static ResolvedTypeMunger read(VersionedDataInputStream s, ISourceContext context)
           
protected static java.util.List<java.lang.String> readInTypeAliases(VersionedDataInputStream s)
           
protected static ISourceLocation readSourceLocation(VersionedDataInputStream s)
           
protected static java.util.Set<ResolvedMember> readSuperMethodsCalled(VersionedDataInputStream s)
           
 void setDeclaredSignature(ResolvedMember rm)
           
 void setSourceLocation(ISourceLocation isl)
           
 void setSuperMethodsCalled(java.util.Set<ResolvedMember> c)
           
protected  void setTypeVariableAliases(java.util.List<java.lang.String> typeVariableAliases)
           
 boolean sharesTypeVariablesWithGenericType()
          return true if type variables are specified with the target type for this ITD.
 java.lang.String toString()
           
abstract  void write(CompressingDataOutputStream s)
           
protected  void writeOutTypeAliases(java.io.DataOutputStream s)
           
protected  void writeSourceLocation(CompressingDataOutputStream s)
           
protected  void writeSuperMethodsCalled(CompressingDataOutputStream s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

kind

protected ResolvedTypeMunger.Kind kind

signature

protected ResolvedMember signature

declaredSignature

protected ResolvedMember declaredSignature
The declared signature is filled in when a type munger is parameterized for application to a particular type. It represents the signature originally declared in the source file.


typeVariableAliases

protected java.util.List<java.lang.String> typeVariableAliases

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
Constructor Detail

ResolvedTypeMunger

public ResolvedTypeMunger(ResolvedTypeMunger.Kind kind,
                          ResolvedMember signature)
Method Detail

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

readSuperMethodsCalled

protected static java.util.Set<ResolvedMember> readSuperMethodsCalled(VersionedDataInputStream s)
                                                               throws java.io.IOException
Throws:
java.io.IOException

writeSuperMethodsCalled

protected final void writeSuperMethodsCalled(CompressingDataOutputStream s)
                                      throws java.io.IOException
Throws:
java.io.IOException

readSourceLocation

protected static ISourceLocation readSourceLocation(VersionedDataInputStream s)
                                             throws java.io.IOException
Throws:
java.io.IOException

writeSourceLocation

protected final void writeSourceLocation(CompressingDataOutputStream s)
                                  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()

readInTypeAliases

protected static java.util.List<java.lang.String> readInTypeAliases(VersionedDataInputStream s)
                                                             throws java.io.IOException
Throws:
java.io.IOException

writeOutTypeAliases

protected final void writeOutTypeAliases(java.io.DataOutputStream s)
                                  throws java.io.IOException
Throws:
java.io.IOException

getTypeVariableAliases

public java.util.List<java.lang.String> getTypeVariableAliases()

setTypeVariableAliases

protected void setTypeVariableAliases(java.util.List<java.lang.String> typeVariableAliases)

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