Class PrivilegedAccessMunger
java.lang.Object
org.aspectj.weaver.ResolvedTypeMunger
org.aspectj.weaver.PrivilegedAccessMunger
- Direct Known Subclasses:
ExposeTypeMunger
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$<fieldname>' and 'ajc$set$<fieldname>' - 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 ResolvedTypeMunger
ResolvedTypeMunger.Kind -
Field Summary
FieldsFields inherited from class ResolvedTypeMunger
AnnotationOnType, Constructor, declaredSignature, Field, FieldHost, InnerClass, kind, Method, MethodDelegate, MethodDelegate2, Parent, PerObjectInterface, PerTypeWithinInterface, PrivilegedAccess, signature, SUPER_DISPATCH_NAME, typeVariableAliasesModifier and TypeFieldDescriptionstatic final ResolvedTypeMunger.Kindstatic final ResolvedTypeMunger.Kindprotected ResolvedMemberThe declared signature is filled in when a type munger is parameterized for application to a particular type.static final ResolvedTypeMunger.Kindstatic final ResolvedTypeMunger.Kindstatic final ResolvedTypeMunger.Kindprotected ResolvedTypeMunger.Kindstatic final ResolvedTypeMunger.Kindstatic final ResolvedTypeMunger.Kindstatic final ResolvedTypeMunger.Kindstatic final ResolvedTypeMunger.Kindstatic final ResolvedTypeMunger.Kindstatic final ResolvedTypeMunger.Kindstatic final ResolvedTypeMunger.Kindprotected ResolvedMemberstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanSome type mungers are created purely to help with the implementation of shadow mungers.getMatchingSyntheticMember(Member member, ResolvedType aspectType) inthashCode()voidMethods inherited from class 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, writeSuperMethodsCalledModifier and TypeMethodDescriptionbooleangetKind()booleanbooleanA late munger has to be done after shadow munging since which shadows are matched can affect the operation of the late munger.booleanmatches(ResolvedType matchType, ResolvedType aspectType) booleanparameterizedFor(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.parameterizedForparameterizeWith(Map<String, UnresolvedType> m, World w) static ResolvedTypeMungerread(VersionedDataInputStream s, ISourceContext context) protected static ISourceLocationprotected static Set<ResolvedMember> voidvoidvoidprotected voidsetTypeVariableAliases(List<String> typeVariableAliases) booleanreturn true if type variables are specified with the target type for this ITD.toString()protected final voidprotected final voidprotected final void
-
Field Details
-
shortSyntax
public boolean shortSyntax
-
-
Constructor Details
-
PrivilegedAccessMunger
-
-
Method Details
-
write
- Specified by:
writein classResolvedTypeMunger- Throws:
IOException
-
getMember
-
getMatchingSyntheticMember
- Overrides:
getMatchingSyntheticMemberin classResolvedTypeMunger
-
equals
-
hashCode
-
existsToSupportShadowMunging
public boolean existsToSupportShadowMunging()Description copied from class:ResolvedTypeMungerSome 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:
existsToSupportShadowMungingin classResolvedTypeMunger
-