Top Description Inners Fields Constructors Methods
org.aspectj.weaver

public abstract Class World

extends Object
implements INode
Class Inheritance
All Implemented Interfaces
org.aspectj.weaver.Dump.INode
Known Direct Subclasses
org.aspectj.weaver.bcel.BcelWorld, org.aspectj.weaver.reflect.ReflectionWorld
Imports
java.lang.ref.Reference, .ReferenceQueue, .SoftReference, .WeakReference, java.util.ArrayList, .Collections, .HashMap, .HashSet, .List, .Map, .Properties, .Set, .WeakHashMap, org.aspectj.bridge.IMessage, .IMessage.Kind, .IMessageHandler, .ISourceLocation, .Message, .MessageUtil, org.aspectj.bridge.context.PinpointingMessageHandler, org.aspectj.util.IStructureModel, org.aspectj.weaver.ResolvedType.Primitive, .UnresolvedType.TypeKind, org.aspectj.weaver.patterns.Declare, .DeclareAnnotation, .DeclareParents, .DeclarePrecedence, .DeclareSoft, .DeclareTypeErrorOrWarning, .Pointcut, .TypePattern, org.aspectj.weaver.tools.PointcutDesignatorHandler, .Trace, .TraceFactory

A World is a collection of known types and crosscutting members.
Authors
PARC, Adrian Colyer, Andy Clement, Abraham Nevado, Joseph MacFarlane

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
World.AspectPrecedenceCalculator

This class is used to compute and store precedence relationships between aspects.

private static class
public static class

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
protected boolean
private boolean
behaveInJava5Way

When behaving in a Java 5 way autoboxing is considered

public final ResolvedType.Primitive
private Object
public final ResolvedType.Primitive
public final ResolvedType.Primitive
private boolean
private boolean
public static boolean
createInjarHierarchy

Should we create the hierarchy for binary classes and aspects

private final CrosscuttingMembersSet
crosscuttingMembersSet

All of the type and shadow mungers known to us

public final ResolvedType.Primitive
private List<RuntimeException>
dumpState_cantFindTypeExceptions

A list of RuntimeExceptions containing full stack information for every type we couldn't find.

private boolean
private Map<ResolvedType, Set<ResolvedType>>
private Properties
private boolean
public final ResolvedType.Primitive
public boolean
public boolean
public boolean
private boolean
incrementalCompileCouldFollow

Determines if this world could be used for multiple compiles

public int
public final ResolvedType.Primitive
private int
private Lint
lint

for processing Xlint messages

public final ResolvedType.Primitive
private IMessageHandler
messageHandler

handler for any messages produced during resolution etc.

private boolean
private IStructureModel
model

The structure model for the compilation

public boolean
private boolean
optionalJoinpoint_ArrayConstruction

Flags for the new joinpoints that are 'optional': -Xjoinpoints:arrayconstruction -Xjoinpoints:synchronization

private boolean
private boolean
private Set<PointcutDesignatorHandler>
pointcutDesignators

New pointcut designators this world supports

private final World.AspectPrecedenceCalculator
precedenceCalculator

Calculator for working out aspect precedence

private boolean
private boolean
public static final RuntimeVersion
RUNTIME_LEVEL_DEFAULT

The level of the aspectjrt.jar the code we generate needs to run on

public final ResolvedType.Primitive
private boolean
private boolean
private boolean
private static boolean
private RuntimeVersion
private boolean
private World.TimeCollector
protected long
protected long
private boolean
timing

Should timing information be reported (as info messages)?

private boolean
private static Trace
private boolean
protected World.TypeMap
typeMap

The heart of the world, a map from type signatures to resolved types

private TypeVariableDeclaringElement
typeVariableLookupScope

Currently 'active' scope in which to lookup (resolve) typevariable references

private boolean
public final ResolvedType.Primitive
private boolean
private BoundedReferenceType
private final Map<Class<?>, TypeVariable[]>
private boolean
XhasMember

XhasMember option setting passed down to weaver

private boolean
XlazyTjp

XlazyTjp option setting passed down to weaver

private boolean
XnoInline

XnoInline option setting passed down to weaver

private boolean
Xpinpoint

Xpinpoint controls whether we put out developer info showing the source of messages

private ICrossReferenceHandler
xrefHandler

handler for cross-reference information produced during the weaving process

public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String

Constructor Summary

AccessConstructor and Description
protected
World()

Insert the primitives

Method Summary

Modifier and TypeMethod and Description
public void
accept(Dump.IVisitor visitor)

Implements org.aspectj.weaver.Dump.INode.accept.

Dump processing when a fatal error occurs
public boolean
public boolean
public boolean
public void
classWriteEvent(char[][] compoundName)

public int
compareByPrecedence(ResolvedType aspect1, ResolvedType aspect2)

Same signature as org.aspectj.util.PartialOrder.PartialComparable.compareTo

public int
compareByPrecedenceAndHierarchy(ResolvedType aspect1, ResolvedType aspect2)

compares by precedence with the additional rule that a super-aspect is sorted before its sub-aspects

protected void
completeBinaryType(ResolvedType ret)

Called when a type is resolved - enables its type hierarchy to be finished off before we proceed

public boolean
public final Advice
createAdviceMunger(AdviceKind kind, Pointcut p, Member signature, int extraParameterFlags, IHasSourceLocation loc, ResolvedType declaringAspect)

Create an advice shadow munger for the given advice kind

public void
demote()

Ask the type map to demote any types it can - we don't want them anchored forever.

public void
private ResolvedType

Returns:

a type suitable for putting into the world
ensureRawTypeIfNecessary
(ResolvedType
a possibly generic type for which the raw needs creating as it is not currently in the world
type
)

When the world is operating in 1.5 mode, the TypeMap should only contain RAW types and never directly generic types.

public void
flush()

be careful calling this - pr152257

public void
public TypePattern
public ResolvedType
getCoreType(UnresolvedType tx)

Special resolution for "core" types like OBJECT.

public CrosscuttingMembersSet
public ICrossReferenceHandler
getCrossReferenceHandler()

Get the cross-reference handler for the world, may be null.

public List<DeclareAnnotation>
public List<DeclareAnnotation>
public List<DeclareAnnotation>
public List<DeclareParents>
public List<DeclareSoft>
public List<DeclareTypeErrorOrWarning>
public Map<ResolvedType, Set<ResolvedType>>
public Map<String, Reference<ResolvedType>>
public Properties
getExtraConfiguration()

may return null

public Map<String, ResolvedType>
public int

Returns:

the ITD version this world wants to create - 1=oldstyle 2=new, transparent style
getItdVersion
()

Returns the version of ITD that this world wants to create.

public Lint
public IMessageHandler
getMessageHandler()

Nobody should hold onto a copy of this message handler, or setMessageHandler won't work right.

public IStructureModel
public Integer
public Set<PointcutDesignatorHandler>
public RuntimeVersion
public World.TypeMap
public TypeVariableDeclaringElement
public TypeVariable[]
public abstract IWeavingSupport
private BoundedReferenceType
private ResolvedType
handleRequiredMissingTypeDuringResolution(UnresolvedType ty)

We tried to resolve a type and couldn't find it...

public boolean

Returns:

true if there is a type missing that this aspect really needed around
hasUnsatisfiedDependency
(ResolvedType aspectType)

Determine if the named aspect requires a particular type around in order to be useful.

public boolean
public boolean
public boolean
protected boolean
isExpendable(ResolvedType type)

Reference types we don't intend to weave may be ejected from the cache if we need the space.

public boolean
public boolean

Returns:

true if ignoring the UnusedDeclaredThrownException and false if this compiler option is set to error or warning
isIgnoringUnusedDeclaredThrownException
()

public boolean
public boolean
public boolean
public boolean
public abstract boolean
public boolean
isLocallyDefined(String classname)

Return true if the classloader relating to this world is definetly the one that will define the specified class.

public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public boolean

Returns:

true if this world has the activation and scope of application of the aspects controlled via aop.xml files
isXmlConfigured
()

public boolean
public ReferenceType
lookupBySignature(String signature)

Lookup a reference type in the world by its signature.

public ReferenceType
lookupOrCreateName(UnresolvedType ty)

Lookup a type by signature, if not found then build one and put it in the map.

private ReferenceType
public void
public void
record(Pointcut pointcut, long timetaken)

Record the time spent matching a pointcut - this will accumulate over the lifetime of this world/weaver and be reported every 25000 join points.

public void
recordFastMatch(Pointcut pointcut, long timetaken)

Record the time spent fastmatching a pointcut - this will accumulate over the lifetime of this world/weaver and be reported every 250 types.

public void
public void
registerPointcutHandler(PointcutDesignatorHandler
handler for the new pointcut
designatorHandler
)

Register a new pointcut designator handler with the world - this can be used by any pointcut parsers attached to the world.

public void
public void
public void
public static void
public ResolvedType
resolve(UnresolvedType ty)

Resolve a type that we require to be present in the world

public ResolvedType
resolve(UnresolvedType ty, ISourceLocation isl)

Attempt to resolve a type - the source location gives you some context in which resolution is taking place.

public ResolvedType[]
resolve(UnresolvedType[] types)

Convenience method for resolving an array of unresolved types in one hit.

public ResolvedType
resolve(UnresolvedType ty, boolean allowMissing)

Resolve a type.

public ResolvedType
resolve(ResolvedType ty)

Some TypeFactory operations create resolved types directly, but these won't be in the typeMap - this resolution process puts them there.

public ResolvedType
resolve(String name)

Convenience method for finding a type by name and resolving it in one step.

public ResolvedType
resolve(String name, boolean allowMissing)

public ResolvedMember
resolve(Member member)

Member resolution is achieved by resolving the declaring type and then looking up the member in the resolved declaring type.

protected abstract ReferenceTypeDelegate
resolveDelegate(ReferenceType ty)

Find the ReferenceTypeDelegate behind this reference type so that it can fulfill its contract.

public ResolvedType
resolveGenericTypeFor(UnresolvedType anUnresolvedType, boolean allowMissing)

Attempt to resolve a type that should be a generic type.

private ReferenceType
resolveGenericWildcardFor(WildcardedUnresolvedType aType)

Go from an unresolved generic wildcard (represented by UnresolvedType) to a resolved version (BoundedReferenceType).

public ReferenceType
private final ResolvedType
resolveToReferenceType(UnresolvedType ty, boolean allowMissing)

Resolve to a ReferenceType - simple, raw, parameterized, or generic.

public void
setAddSerialVerUID(boolean b)

public void
public void
public void
public void
setErrorAndWarningThreshold(boolean errorThreshold, boolean warningThreshold)

Set the error and warning threashold which can be taken from CompilerOptions (see bug 129282)

public void
public void
setLint(Lint lint)

public void
public void
public void
public void
setPinpointMode(boolean b)

public void
public void
public void
setTiming(boolean timersOn, boolean reportPeriodically)

Set the timing option (whether to collect timing info), this will also need INFO messages turned on for the message handler being used.

public void
public void
public void
setXlazyTjp(boolean b)

public void
setXnoInline(boolean xnoInline)

public boolean
public boolean
public boolean
public void
showMessage(IMessage.Kind kind, String message, ISourceLocation loc1, ISourceLocation loc2)

convenenience method for creating and issuing messages via the message handler - if you supply two locations you will get two messages.

public boolean
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait