Top Description Fields Constructors Methods
org.aspectj.weaver

public Class CrosscuttingMembers

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Collection, .HashSet, .Hashtable, .Iterator, .LinkedHashSet, .List, .Map, .Set, org.aspectj.weaver.AjAttribute.WeaverVersionInfo, org.aspectj.weaver.patterns.Declare, .DeclareAnnotation, .DeclareErrorOrWarning, .DeclareParents, .DeclarePrecedence, .DeclareSoft, .DeclareTypeErrorOrWarning, .PerClause, .Pointcut, .PointcutRewriter

This holds on to all members that have an invasive effect outside of there own compilation unit. These members need to be all gathered up and in a world before any weaving can take place. They are also important in the compilation process and need to be gathered up before the inter-type declaration weaving stage (unsurprisingly). All members are concrete.
Author
Jim Hugunin

Field Summary

Modifier and TypeField and Description
private final Map<String, Object>
private final Map<String, Object>
private Set<DeclareAnnotation>
private Set<DeclareAnnotation>
private Set<DeclareAnnotation>
private List<Declare>
private Set<DeclareParents>
private Set<DeclareSoft>
private Set<DeclareTypeErrorOrWarning>
private final ResolvedType
private List<ConcreteTypeMunger>
private PerClause
private List<ShadowMunger>
private boolean
private List<ConcreteTypeMunger>
private final World

Constructor Summary

AccessConstructor and Description
public
CrosscuttingMembers(ResolvedType inAspect, boolean shouldConcretizeIfNeeded)

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
public void
public void
public void
private void
public void
public void
public void
public void
private boolean
equivalent(Set<ShadowMunger> theseInlinedAroundMungers, Set<ShadowMunger> otherInlinedAroundMungers)

public void
exposeType(UnresolvedType typeToExpose)

public void
public Map<String, Object>
public Collection<ShadowMunger>
public Map<String, Object>
public Collection<DeclareAnnotation>
public Collection<DeclareAnnotation>
getDeclareAnnotationOnMethods()

includes declare @method and @constructor

public Collection<DeclareAnnotation>
public List<Declare>
public Collection<DeclareParents>
public Collection<DeclareSoft>
public Collection<DeclareTypeErrorOrWarning>
public List<ConcreteTypeMunger>
public List<ShadowMunger>
public List<ConcreteTypeMunger>
public boolean

Returns:

true if something has changed since the last time this method was called, false otherwise
replaceWith
(CrosscuttingMembers other, boolean careAboutShadowMungers)

Updates the records if something has changed.

private ShadowMunger
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cflowBelowFieldsback to summary
private final Map<String, Object> cflowBelowFields
cflowFieldsback to summary
private final Map<String, Object> cflowFields
declareAnnotationsOnFieldback to summary
private Set<DeclareAnnotation> declareAnnotationsOnField
declareAnnotationsOnMethodsback to summary
private Set<DeclareAnnotation> declareAnnotationsOnMethods
declareAnnotationsOnTypeback to summary
private Set<DeclareAnnotation> declareAnnotationsOnType
declareDominatesback to summary
private List<Declare> declareDominates
declareParentsback to summary
private Set<DeclareParents> declareParents
declareSoftsback to summary
private Set<DeclareSoft> declareSofts
declareTypeEowback to summary
private Set<DeclareTypeErrorOrWarning> declareTypeEow
inAspectback to summary
private final ResolvedType inAspect
lateTypeMungersback to summary
private List<ConcreteTypeMunger> lateTypeMungers
perClauseback to summary
private PerClause perClause
shadowMungersback to summary
private List<ShadowMunger> shadowMungers
shouldConcretizeIfNeededback to summary
private boolean shouldConcretizeIfNeeded
typeMungersback to summary
private List<ConcreteTypeMunger> typeMungers
worldback to summary
private final World world

Constructor Detail

CrosscuttingMembersback to summary
public CrosscuttingMembers(ResolvedType inAspect, boolean shouldConcretizeIfNeeded)

Method Detail

addConcreteShadowMungerback to summary
public void addConcreteShadowMunger(ShadowMunger m)
addDeclareback to summary
public void addDeclare(Declare declare)
addDeclaresback to summary
public void addDeclares(Collection<Declare> declares)
addLateTypeMungerback to summary
public void addLateTypeMunger(ConcreteTypeMunger m)
addLateTypeMungersback to summary
public void addLateTypeMungers(Collection<ConcreteTypeMunger> c)
addPrivilegedAccessesback to summary
public void addPrivilegedAccesses(Collection<ResolvedMember> accessedMembers)
addShadowMungerback to summary
private void addShadowMunger(ShadowMunger m)
addShadowMungersback to summary
public void addShadowMungers(Collection<ShadowMunger> c)
addTypeMungerback to summary
public void addTypeMunger(ConcreteTypeMunger m)
addTypeMungersback to summary
public void addTypeMungers(Collection<ConcreteTypeMunger> c)
clearCachesback to summary
public void clearCaches()
equivalentback to summary
private boolean equivalent(Set<ShadowMunger> theseInlinedAroundMungers, Set<ShadowMunger> otherInlinedAroundMungers)
exposeTypeback to summary
public void exposeType(UnresolvedType typeToExpose)
exposeTypesback to summary
public void exposeTypes(List<UnresolvedType> typesToExpose)
getCflowBelowFieldsback to summary
public Map<String, Object> getCflowBelowFields()
getCflowEntriesback to summary
public Collection<ShadowMunger> getCflowEntries()
getCflowFieldsback to summary
public Map<String, Object> getCflowFields()
getDeclareAnnotationOnFieldsback to summary
public Collection<DeclareAnnotation> getDeclareAnnotationOnFields()
getDeclareAnnotationOnMethodsback to summary
public Collection<DeclareAnnotation> getDeclareAnnotationOnMethods()

includes declare @method and @constructor

getDeclareAnnotationOnTypesback to summary
public Collection<DeclareAnnotation> getDeclareAnnotationOnTypes()
getDeclareDominatesback to summary
public List<Declare> getDeclareDominates()
getDeclareParentsback to summary
public Collection<DeclareParents> getDeclareParents()
getDeclareSoftsback to summary
public Collection<DeclareSoft> getDeclareSofts()
getDeclareTypeErrorOrWarningback to summary
public Collection<DeclareTypeErrorOrWarning> getDeclareTypeErrorOrWarning()
getLateTypeMungersback to summary
public List<ConcreteTypeMunger> getLateTypeMungers()
getShadowMungersback to summary
public List<ShadowMunger> getShadowMungers()
getTypeMungersback to summary
public List<ConcreteTypeMunger> getTypeMungers()
replaceWithback to summary
public boolean replaceWith(CrosscuttingMembers other, boolean careAboutShadowMungers)

Updates the records if something has changed. This is called at most twice, firstly whilst collecting ITDs and declares. At this point the CrosscuttingMembers we're comparing ourselves with doesn't know about shadowmungers. Therefore a straight comparison with the existing list of shadowmungers would return that something has changed even though it might not have, so in this first round we ignore the shadowMungers. The second time this is called is whilst we're preparing to weave. At this point we know everything in the system and so we're able to compare the shadowMunger list. (see bug 129163)

Returns:boolean

true if something has changed since the last time this method was called, false otherwise

rewritePointcutInMungerback to summary
private ShadowMunger rewritePointcutInMunger(ShadowMunger munger)
setPerClauseback to summary
public void setPerClause(PerClause perClause)