Package org.aspectj.weaver
Klasse World
java.lang.Object
org.aspectj.weaver.World
- Alle implementierten Schnittstellen:
Dump.INode
- Bekannte direkte Unterklassen:
BcelWorld
,ReflectionWorld
A World is a collection of known types and crosscutting members.
- Autor:
- PARC, Adrian Colyer, Andy Clement, Abraham Nevado, Joseph MacFarlane
-
Verschachtelte Klassen - Übersicht
-
Feldübersicht
Modifizierer und TypFeldBeschreibungprotected boolean
final org.aspectj.weaver.ResolvedType.Primitive
final org.aspectj.weaver.ResolvedType.Primitive
final org.aspectj.weaver.ResolvedType.Primitive
static boolean
Should we create the hierarchy for binary classes and aspectsfinal org.aspectj.weaver.ResolvedType.Primitive
final org.aspectj.weaver.ResolvedType.Primitive
boolean
boolean
boolean
int
final org.aspectj.weaver.ResolvedType.Primitive
final org.aspectj.weaver.ResolvedType.Primitive
boolean
static final RuntimeVersion
The level of the aspectjrt.jar the code we generate needs to run onfinal org.aspectj.weaver.ResolvedType.Primitive
protected long
protected long
protected World.TypeMap
The heart of the world, a map from type signatures to resolved typesfinal org.aspectj.weaver.ResolvedType.Primitive
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
accept
(Dump.IVisitor visitor) Dump processing when a fatal error occursboolean
boolean
boolean
void
classWriteEvent
(char[][] compoundName) int
compareByPrecedence
(ResolvedType aspect1, ResolvedType aspect2) Same signature as org.aspectj.util.PartialOrder.PartialComparable.compareToint
compareByPrecedenceAndHierarchy
(ResolvedType aspect1, ResolvedType aspect2) compares by precedence with the additional rule that a super-aspect is sorted before its sub-aspectsprotected void
Called when a type is resolved - enables its type hierarchy to be finished off before we proceedboolean
final Advice
createAdviceMunger
(AdviceKind kind, Pointcut p, Member signature, int extraParameterFlags, IHasSourceLocation loc, ResolvedType declaringAspect) Create an advice shadow munger for the given advice kindvoid
demote()
Ask the type map to demote any types it can - we don't want them anchored forever.void
void
flush()
be careful calling this - pr152257void
forgetTypeVariablesCurrentlyBeingProcessed
(Class<?> baseClass) getAspectScope
(ResolvedType declaringType) Special resolution for "core" types like OBJECT.Get the cross-reference handler for the world, may be null.may return nullgetFixed()
int
Returns the version of ITD that this world wants to create.getLint()
Nobody should hold onto a copy of this message handler, or setMessageHandler won't work right.getModel()
getPrecedenceIfAny
(ResolvedType aspect1, ResolvedType aspect2) getTypeVariablesCurrentlyBeingProcessed
(Class<?> baseClass) abstract IWeavingSupport
boolean
hasUnsatisfiedDependency
(ResolvedType aspectType) Determine if the named aspect requires a particular type around in order to be useful.boolean
boolean
isAspectIncluded
(ResolvedType aspectType) 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.boolean
boolean
boolean
boolean
boolean
boolean
abstract boolean
boolean
isLocallyDefined
(String classname) Return true if the classloader relating to this world is definetly the one that will define the specified class.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
lookupBySignature
(String signature) Lookup a reference type in the world by its signature.Lookup a type by signature, if not found then build one and put it in the map.void
performExtraConfiguration
(String config) void
Record the time spent matching a pointcut - this will accumulate over the lifetime of this world/weaver and be reported every 25000 join points.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.void
recordTypeVariablesCurrentlyBeingProcessed
(Class<?> baseClass, TypeVariable[] typeVariables) void
registerPointcutHandler
(PointcutDesignatorHandler designatorHandler) Register a new pointcut designator handler with the world - this can be used by any pointcut parsers attached to the world.void
reportCheckerMatch
(Checker checker, Shadow shadow) void
reportMatch
(ShadowMunger munger, Shadow shadow) void
static void
reset()
Convenience method for finding a type by name and resolving it in one step.Member resolution is achieved by resolving the declaring type and then looking up the member in the resolved declaring type.resolve
(ResolvedType ty) Some TypeFactory operations create resolved types directly, but these won't be in the typeMap - this resolution process puts them there.Resolve a type that we require to be present in the worldresolve
(UnresolvedType[] types) Convenience method for resolving an array of unresolved types in one hit.resolve
(UnresolvedType ty, boolean allowMissing) Resolve a type.resolve
(UnresolvedType ty, ISourceLocation isl) Attempt to resolve a type - the source location gives you some context in which resolution is taking place.protected abstract ReferenceTypeDelegate
Find the ReferenceTypeDelegate behind this reference type so that it can fulfill its contract.resolveGenericTypeFor
(UnresolvedType anUnresolvedType, boolean allowMissing) Attempt to resolve a type that should be a generic type.resolveToReferenceType
(String name) void
setAddSerialVerUID
(boolean b) void
void
setBehaveInJava5Way
(boolean b) void
setCrossReferenceHandler
(ICrossReferenceHandler xrefHandler) void
setErrorAndWarningThreshold
(boolean errorThreshold, boolean warningThreshold) Set the error and warning threashold which can be taken from CompilerOptions (see bug 129282)void
setIncrementalCompileCouldFollow
(boolean b) void
void
setMessageHandler
(IMessageHandler messageHandler) void
setModel
(IStructureModel model) void
void
setPinpointMode
(boolean b) void
void
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.void
void
setXHasMemberSupportEnabled
(boolean b) void
setXlazyTjp
(boolean b) void
setXnoInline
(boolean xnoInline) boolean
boolean
boolean
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.boolean
useFinal()
void
validateType
(UnresolvedType type)
-
Felddetails
-
typeMap
The heart of the world, a map from type signatures to resolved types -
createInjarHierarchy
public static boolean createInjarHierarchyShould we create the hierarchy for binary classes and aspects -
RUNTIME_LEVEL_DEFAULT
The level of the aspectjrt.jar the code we generate needs to run on -
bcelRepositoryCaching
protected boolean bcelRepositoryCaching -
forDEBUG_structuralChangesCode
public boolean forDEBUG_structuralChangesCode -
forDEBUG_bridgingCode
public boolean forDEBUG_bridgingCode -
optimizedMatching
public boolean optimizedMatching -
generateNewLvts
public boolean generateNewLvts -
timersPerJoinpoint
protected long timersPerJoinpoint -
timersPerType
protected long timersPerType -
infoMessagesEnabled
public int infoMessagesEnabled -
BYTE
public final org.aspectj.weaver.ResolvedType.Primitive BYTE -
CHAR
public final org.aspectj.weaver.ResolvedType.Primitive CHAR -
DOUBLE
public final org.aspectj.weaver.ResolvedType.Primitive DOUBLE -
FLOAT
public final org.aspectj.weaver.ResolvedType.Primitive FLOAT -
INT
public final org.aspectj.weaver.ResolvedType.Primitive INT -
LONG
public final org.aspectj.weaver.ResolvedType.Primitive LONG -
SHORT
public final org.aspectj.weaver.ResolvedType.Primitive SHORT -
BOOLEAN
public final org.aspectj.weaver.ResolvedType.Primitive BOOLEAN -
VOID
public final org.aspectj.weaver.ResolvedType.Primitive VOID -
xsetAVOID_FINAL
- Siehe auch:
-
xsetWEAVE_JAVA_PACKAGES
- Siehe auch:
-
xsetWEAVE_JAVAX_PACKAGES
- Siehe auch:
-
xsetCAPTURE_ALL_CONTEXT
- Siehe auch:
-
xsetRUN_MINIMAL_MEMORY
- Siehe auch:
-
xsetDEBUG_STRUCTURAL_CHANGES_CODE
- Siehe auch:
-
xsetDEBUG_BRIDGING
- Siehe auch:
-
xsetTRANSIENT_TJP_FIELDS
- Siehe auch:
-
xsetBCEL_REPOSITORY_CACHING
- Siehe auch:
-
xsetPIPELINE_COMPILATION
- Siehe auch:
-
xsetGENERATE_STACKMAPS
- Siehe auch:
-
xsetPIPELINE_COMPILATION_DEFAULT
- Siehe auch:
-
xsetCOMPLETE_BINARY_TYPES
- Siehe auch:
-
xsetCOMPLETE_BINARY_TYPES_DEFAULT
- Siehe auch:
-
xsetTYPE_DEMOTION
- Siehe auch:
-
xsetTYPE_DEMOTION_DEBUG
- Siehe auch:
-
xsetTYPE_REFS
- Siehe auch:
-
xsetBCEL_REPOSITORY_CACHING_DEFAULT
- Siehe auch:
-
xsetFAST_PACK_METHODS
- Siehe auch:
-
xsetOVERWEAVING
- Siehe auch:
-
xsetOPTIMIZED_MATCHING
- Siehe auch:
-
xsetTIMERS_PER_JOINPOINT
- Siehe auch:
-
xsetTIMERS_PER_FASTMATCH_CALL
- Siehe auch:
-
xsetITD_VERSION
- Siehe auch:
-
xsetITD_VERSION_ORIGINAL
- Siehe auch:
-
xsetITD_VERSION_2NDGEN
- Siehe auch:
-
xsetITD_VERSION_DEFAULT
- Siehe auch:
-
xsetMINIMAL_MODEL
- Siehe auch:
-
xsetTARGETING_RUNTIME_1610
- Siehe auch:
-
xsetGENERATE_NEW_LVTS
- Siehe auch:
-
-
Konstruktordetails
-
World
protected World()Insert the primitives
-
-
Methodendetails
-
accept
Dump processing when a fatal error occurs- Angegeben von:
accept
in SchnittstelleDump.INode
-
resolve
Resolve a type that we require to be present in the world -
resolve
Attempt to resolve a type - the source location gives you some context in which resolution is taking place. In the case of an error where we can't find the type - we can then at least report why (source location) we were trying to resolve it. -
resolve
Convenience method for resolving an array of unresolved types in one hit. Useful for e.g. resolving type parameters in signatures. -
resolve
Resolve a type. This the hub of type resolution. The resolved type is added to the type map by signature. -
completeBinaryType
Called when a type is resolved - enables its type hierarchy to be finished off before we proceed -
isLocallyDefined
Return true if the classloader relating to this world is definetly the one that will define the specified class. Return false otherwise or we don't know for certain. -
resolve
Some TypeFactory operations create resolved types directly, but these won't be in the typeMap - this resolution process puts them there. Resolved types are also told their world which is needed for the special autoboxing resolved types. -
resolve
Convenience method for finding a type by name and resolving it in one step. -
resolveToReferenceType
-
resolve
-
resolveGenericTypeFor
Attempt to resolve a type that should be a generic type. -
resolveDelegate
Find the ReferenceTypeDelegate behind this reference type so that it can fulfill its contract. -
getCoreType
Special resolution for "core" types like OBJECT. These are resolved just like any other type, but if they are not found it is more serious and we issue an error message immediately. -
lookupOrCreateName
Lookup a type by signature, if not found then build one and put it in the map. -
lookupBySignature
Lookup a reference type in the world by its signature. Returns null if not found. -
resolve
Member resolution is achieved by resolving the declaring type and then looking up the member in the resolved declaring type. -
setAllLintIgnored
public void setAllLintIgnored() -
areAllLintIgnored
public boolean areAllLintIgnored() -
getWeavingSupport
-
createAdviceMunger
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 -
compareByPrecedence
Same signature as org.aspectj.util.PartialOrder.PartialComparable.compareTo -
getPrecedenceIfAny
-
compareByPrecedenceAndHierarchy
compares by precedence with the additional rule that a super-aspect is sorted before its sub-aspects -
getMessageHandler
Nobody should hold onto a copy of this message handler, or setMessageHandler won't work right. -
setMessageHandler
-
showMessage
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. -
setCrossReferenceHandler
-
getCrossReferenceHandler
Get the cross-reference handler for the world, may be null. -
setTypeVariableLookupScope
-
getTypeVariableLookupScope
-
getDeclareParents
-
getDeclareAnnotationOnTypes
-
getDeclareAnnotationOnFields
-
getDeclareAnnotationOnMethods
-
getDeclareTypeEows
-
getDeclareSoft
-
getCrosscuttingMembersSet
-
getModel
-
setModel
-
getLint
-
setLint
-
isXnoInline
public boolean isXnoInline() -
setXnoInline
public void setXnoInline(boolean xnoInline) -
isXlazyTjp
public boolean isXlazyTjp() -
setXlazyTjp
public void setXlazyTjp(boolean b) -
isHasMemberSupportEnabled
public boolean isHasMemberSupportEnabled() -
setXHasMemberSupportEnabled
public void setXHasMemberSupportEnabled(boolean b) -
isInPinpointMode
public boolean isInPinpointMode() -
setPinpointMode
public void setPinpointMode(boolean b) -
useFinal
public boolean useFinal() -
isMinimalModel
public boolean isMinimalModel() -
isTargettingRuntime1_6_10
public boolean isTargettingRuntime1_6_10() -
setBehaveInJava5Way
public void setBehaveInJava5Way(boolean b) -
setTiming
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. The reportPeriodically flag should be set to false under AJDT so numbers just come out at the end. -
setErrorAndWarningThreshold
public void setErrorAndWarningThreshold(boolean errorThreshold, boolean warningThreshold) Set the error and warning threashold which can be taken from CompilerOptions (see bug 129282)- Parameter:
errorThreshold
-warningThreshold
-
-
isIgnoringUnusedDeclaredThrownException
public boolean isIgnoringUnusedDeclaredThrownException()- Gibt zurück:
- true if ignoring the UnusedDeclaredThrownException and false if this compiler option is set to error or warning
-
performExtraConfiguration
-
areInfoMessagesEnabled
public boolean areInfoMessagesEnabled() -
getExtraConfiguration
may return null -
isInJava5Mode
public boolean isInJava5Mode() -
isTimingEnabled
public boolean isTimingEnabled() -
setTargetAspectjRuntimeLevel
-
setOptionalJoinpoints
-
isJoinpointArrayConstructionEnabled
public boolean isJoinpointArrayConstructionEnabled() -
isJoinpointSynchronizationEnabled
public boolean isJoinpointSynchronizationEnabled() -
getTargetAspectjRuntimeLevel
-
isTargettingAspectJRuntime12
public boolean isTargettingAspectJRuntime12() -
validateType
-
isDemotionActive
public boolean isDemotionActive() -
getTypeVariablesCurrentlyBeingProcessed
-
recordTypeVariablesCurrentlyBeingProcessed
public void recordTypeVariablesCurrentlyBeingProcessed(Class<?> baseClass, TypeVariable[] typeVariables) -
forgetTypeVariablesCurrentlyBeingProcessed
-
setAddSerialVerUID
public void setAddSerialVerUID(boolean b) -
isAddSerialVerUID
public boolean isAddSerialVerUID() -
flush
public void flush()be careful calling this - pr152257 -
ensureAdvancedConfigurationProcessed
public void ensureAdvancedConfigurationProcessed() -
isRunMinimalMemory
public boolean isRunMinimalMemory() -
isTransientTjpFields
public boolean isTransientTjpFields() -
isRunMinimalMemorySet
public boolean isRunMinimalMemorySet() -
shouldFastPackMethods
public boolean shouldFastPackMethods() -
shouldPipelineCompilation
public boolean shouldPipelineCompilation() -
shouldGenerateStackMaps
public boolean shouldGenerateStackMaps() -
setIncrementalCompileCouldFollow
public void setIncrementalCompileCouldFollow(boolean b) -
couldIncrementalCompileFollow
public boolean couldIncrementalCompileFollow() -
setSynchronizationPointcutsInUse
public void setSynchronizationPointcutsInUse() -
areSynchronizationPointcutsInUse
public boolean areSynchronizationPointcutsInUse() -
registerPointcutHandler
Register a new pointcut designator handler with the world - this can be used by any pointcut parsers attached to the world.- Parameter:
designatorHandler
- handler for the new pointcut
-
getRegisteredPointcutHandlers
-
reportMatch
-
isOverWeaving
public boolean isOverWeaving() -
reportCheckerMatch
-
isXmlConfigured
public boolean isXmlConfigured()- Gibt zurück:
- true if this world has the activation and scope of application of the aspects controlled via aop.xml files
-
isAspectIncluded
-
hasUnsatisfiedDependency
Determine if the named aspect requires a particular type around in order to be useful. The type is named in the aop.xml file against the aspect.- Gibt zurück:
- true if there is a type missing that this aspect really needed around
-
getAspectScope
-
getFixed
-
getExpendable
-
demote
public void demote()Ask the type map to demote any types it can - we don't want them anchored forever. -
isExpendable
Reference types we don't intend to weave may be ejected from the cache if we need the space. -
getExclusionMap
-
record
Record the time spent matching a pointcut - this will accumulate over the lifetime of this world/weaver and be reported every 25000 join points. -
recordFastMatch
Record the time spent fastmatching a pointcut - this will accumulate over the lifetime of this world/weaver and be reported every 250 types. -
reportTimers
public void reportTimers() -
getTypeMap
-
reset
public static void reset() -
getItdVersion
public int getItdVersion()Returns the version of ITD that this world wants to create. The default is the new style (2) but in some cases where there might be a clash, the old style can be used. It is set through the option -Xset:itdVersion=1- Gibt zurück:
- the ITD version this world wants to create - 1=oldstyle 2=new, transparent style
-
isLoadtimeWeaving
public abstract boolean isLoadtimeWeaving() -
classWriteEvent
public void classWriteEvent(char[][] compoundName)
-