org.aspectj.weaver
Class PrivilegedAccessMunger

java.lang.Object
  extended by org.aspectj.weaver.ResolvedTypeMunger
      extended by org.aspectj.weaver.PrivilegedAccessMunger
Direct Known Subclasses:
ExposeTypeMunger

public class PrivilegedAccessMunger
extends ResolvedTypeMunger

A privileged access munger is for handling privileged access to a member. It determines the names of the getter/setter that will be used to access a private field in some type, or the special method that provides access to a private method. There are two syntax styles for field access, the older style was in use up to AspectJ 1.6.9 and involves long named getters and setters which include the requesting aspect and the target type. The short style syntax is use from AspectJ 1.6.9 onwards is simply 'ajc$get$' and 'ajc$set$' - as the requesting aspect isn't included in the name they can be shared across aspects.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.aspectj.weaver.ResolvedTypeMunger
ResolvedTypeMunger.Kind
 
Field Summary
 boolean shortSyntax
           
 
Fields inherited from class org.aspectj.weaver.ResolvedTypeMunger
AnnotationOnType, Constructor, declaredSignature, Field, FieldHost, InnerClass, kind, Method, MethodDelegate, MethodDelegate2, Parent, PerObjectInterface, PerTypeWithinInterface, PrivilegedAccess, signature, SUPER_DISPATCH_NAME, typeVariableAliases
 
Constructor Summary
PrivilegedAccessMunger(ResolvedMember member, boolean shortSyntax)
           
 
Method Summary
 boolean equals(java.lang.Object other)
           
 boolean existsToSupportShadowMunging()
          Some type mungers are created purely to help with the implementation of shadow mungers.
 ResolvedMember getMatchingSyntheticMember(Member member, ResolvedType aspectType)
           
 ResolvedMember getMember()
           
 int hashCode()
           
 void write(CompressingDataOutputStream s)
           
 
Methods inherited from class org.aspectj.weaver.ResolvedTypeMunger
changesPublicSignature, getDeclaredSignature, getDeclaringType, getKind, getSignature, getSourceLocation, getSuperMethodsCalled, getTypeVariableAliases, hasTypeVariableAliases, isLateMunger, matches, needsAccessToTopmostImplementor, parameterizedFor, parameterizeWith, read, readInTypeAliases, readSourceLocation, readSuperMethodsCalled, setDeclaredSignature, setSourceLocation, setSuperMethodsCalled, setTypeVariableAliases, sharesTypeVariablesWithGenericType, toString, writeOutTypeAliases, writeSourceLocation, writeSuperMethodsCalled
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

shortSyntax

public boolean shortSyntax
Constructor Detail

PrivilegedAccessMunger

public PrivilegedAccessMunger(ResolvedMember member,
                              boolean shortSyntax)
Method Detail

write

public void write(CompressingDataOutputStream s)
           throws java.io.IOException
Specified by:
write in class ResolvedTypeMunger
Throws:
java.io.IOException

getMember

public ResolvedMember getMember()

getMatchingSyntheticMember

public ResolvedMember getMatchingSyntheticMember(Member member,
                                                 ResolvedType aspectType)
Overrides:
getMatchingSyntheticMember in class ResolvedTypeMunger

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

existsToSupportShadowMunging

public boolean existsToSupportShadowMunging()
Description copied from class: ResolvedTypeMunger
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.

Overrides:
existsToSupportShadowMunging in class ResolvedTypeMunger