Top Description Inners Fields Constructors Methods
org.aspectj.weaver

public Class JoinPointSignatureIterator

extends Object
implements Iterator<JoinPointSignature>
Class Inheritance
All Implemented Interfaces
java.util.Iterator
Imports
java.lang.reflect.Modifier, java.util.ArrayList, .Collections, .HashSet, .Iterator, .List, .NoSuchElementException, .Set

Iterates over the signatures of a join point, calculating new signatures lazily to minimize processing and to avoid unneccessary "can't find type" errors. Iterator can be cached and reused by calling the "reset" method between iterations.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private List<JoinPointSignature>
private boolean
private List<JoinPointSignature>
private Iterator<JoinPointSignature>
private ResolvedMember
pack-priv ResolvedType
private boolean
private boolean
private static final UnresolvedType
private Member
private Iterator<ResolvedType>
private Set<ResolvedType>
private World
private List<JoinPointSignatureIterator.SearchPair>

Constructor Summary

AccessConstructor and Description
public
JoinPointSignatureIterator(Member joinPointSignature, World world)

Method Summary

Modifier and TypeMethod and Description
private void
accumulateTypesInBetween(ResolvedType subType, ResolvedType superType, List<ResolvedType> types)

Build a list containing every type between subtype and supertype, inclusively.

private void
addSignaturesUpToFirstDefiningMember()

Walk up the hierarchy creating one member for each type up to and including the first defining type.

private boolean
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.
private boolean
isVisibleTo(ResolvedMember childMember, ResolvedMember parentMember)

Returns true if the parent member is visible to the child member In the same declaring type this is always true, otherwise if parent is private it is false.

public JoinPointSignature
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.
public void
remove()

Overrides default java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation).
public void
private boolean
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

additionalSignaturesback to summary
private List<JoinPointSignature> additionalSignatures
couldBeFurtherAsYetUndiscoveredSignaturesback to summary
private boolean couldBeFurtherAsYetUndiscoveredSignatures
discoveredSignaturesback to summary
private List<JoinPointSignature> discoveredSignatures
discoveredSignaturesIteratorback to summary
private Iterator<JoinPointSignature> discoveredSignaturesIterator
firstDefiningMemberback to summary
private ResolvedMember firstDefiningMember
firstDefiningTypeback to summary
pack-priv ResolvedType firstDefiningType
isProxyback to summary
private boolean isProxy
iteratingOverDiscoveredSignaturesback to summary
private boolean iteratingOverDiscoveredSignatures
jlrProxyback to summary
private static final UnresolvedType jlrProxy
signaturesOfMemberback to summary
private Member signaturesOfMember
superTypeIteratorback to summary
private Iterator<ResolvedType> superTypeIterator
visitedSuperTypesback to summary
private Set<ResolvedType> visitedSuperTypes
worldback to summary
private World world
yetToBeProcessedSuperMembersback to summary
private List<JoinPointSignatureIterator.SearchPair> yetToBeProcessedSuperMembers

Constructor Detail

JoinPointSignatureIteratorback to summary
public JoinPointSignatureIterator(Member joinPointSignature, World world)

Method Detail

accumulateTypesInBetweenback to summary
private void accumulateTypesInBetween(ResolvedType subType, ResolvedType superType, List<ResolvedType> types)

Build a list containing every type between subtype and supertype, inclusively.

addSignaturesUpToFirstDefiningMemberback to summary
private void addSignaturesUpToFirstDefiningMember()

Walk up the hierarchy creating one member for each type up to and including the first defining type.

findSignaturesFromSupertypesback to summary
private boolean findSignaturesFromSupertypes()
hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

isVisibleToback to summary
private boolean isVisibleTo(ResolvedMember childMember, ResolvedMember parentMember)

Returns true if the parent member is visible to the child member In the same declaring type this is always true, otherwise if parent is private it is false.

nextback to summary
public JoinPointSignature next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:JoinPointSignature

the next element in the iteration

removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Doc from java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to next.

The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.

The behavior of an iterator is unspecified if this method is called after a call to the forEachRemaining method.

resetback to summary
public void reset()
shouldWalkUpHierarchyback to summary
private boolean shouldWalkUpHierarchy()
warnOnMissingTypeback to summary
private void warnOnMissingType(ResolvedType missing)
org.aspectj.weaver back to summary

private Class JoinPointSignatureIterator.SearchPair

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
public ResolvedMember
public ResolvedType

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

memberback to summary
public ResolvedMember member
typeback to summary
public ResolvedType type

Constructor Detail

SearchPairback to summary
public SearchPair(ResolvedMember member, ResolvedType type)