public abstract class World extends java.lang.Object implements Dump.INode
Modifier and Type | Class and Description |
---|---|
static class |
World.TypeMap |
Modifier and Type | Field and Description |
---|---|
protected boolean |
bcelRepositoryCaching |
org.aspectj.weaver.ResolvedType.Primitive |
BOOLEAN |
org.aspectj.weaver.ResolvedType.Primitive |
BYTE |
org.aspectj.weaver.ResolvedType.Primitive |
CHAR |
static boolean |
createInjarHierarchy
Should we create the hierarchy for binary classes and aspects
|
org.aspectj.weaver.ResolvedType.Primitive |
DOUBLE |
org.aspectj.weaver.ResolvedType.Primitive |
FLOAT |
boolean |
forDEBUG_bridgingCode |
boolean |
forDEBUG_structuralChangesCode |
boolean |
generateNewLvts |
int |
infoMessagesEnabled |
org.aspectj.weaver.ResolvedType.Primitive |
INT |
org.aspectj.weaver.ResolvedType.Primitive |
LONG |
boolean |
optimizedMatching |
static RuntimeVersion |
RUNTIME_LEVEL_DEFAULT
The level of the aspectjrt.jar the code we generate needs to run on
|
org.aspectj.weaver.ResolvedType.Primitive |
SHORT |
protected long |
timersPerJoinpoint |
protected long |
timersPerType |
protected World.TypeMap |
typeMap
The heart of the world, a map from type signatures to resolved types
|
org.aspectj.weaver.ResolvedType.Primitive |
VOID |
static java.lang.String |
xsetAVOID_FINAL |
static java.lang.String |
xsetBCEL_REPOSITORY_CACHING |
static java.lang.String |
xsetBCEL_REPOSITORY_CACHING_DEFAULT |
static java.lang.String |
xsetCAPTURE_ALL_CONTEXT |
static java.lang.String |
xsetCOMPLETE_BINARY_TYPES |
static java.lang.String |
xsetCOMPLETE_BINARY_TYPES_DEFAULT |
static java.lang.String |
xsetDEBUG_BRIDGING |
static java.lang.String |
xsetDEBUG_STRUCTURAL_CHANGES_CODE |
static java.lang.String |
xsetFAST_PACK_METHODS |
static java.lang.String |
xsetGENERATE_NEW_LVTS |
static java.lang.String |
xsetGENERATE_STACKMAPS |
static java.lang.String |
xsetITD_VERSION |
static java.lang.String |
xsetITD_VERSION_2NDGEN |
static java.lang.String |
xsetITD_VERSION_DEFAULT |
static java.lang.String |
xsetITD_VERSION_ORIGINAL |
static java.lang.String |
xsetMINIMAL_MODEL |
static java.lang.String |
xsetOPTIMIZED_MATCHING |
static java.lang.String |
xsetOVERWEAVING |
static java.lang.String |
xsetPIPELINE_COMPILATION |
static java.lang.String |
xsetPIPELINE_COMPILATION_DEFAULT |
static java.lang.String |
xsetRUN_MINIMAL_MEMORY |
static java.lang.String |
xsetTARGETING_RUNTIME_1610 |
static java.lang.String |
xsetTIMERS_PER_FASTMATCH_CALL |
static java.lang.String |
xsetTIMERS_PER_JOINPOINT |
static java.lang.String |
xsetTRANSIENT_TJP_FIELDS |
static java.lang.String |
xsetTYPE_DEMOTION |
static java.lang.String |
xsetTYPE_DEMOTION_DEBUG |
static java.lang.String |
xsetTYPE_REFS |
static java.lang.String |
xsetWEAVE_JAVA_PACKAGES |
static java.lang.String |
xsetWEAVE_JAVAX_PACKAGES |
Modifier | Constructor and Description |
---|---|
protected |
World()
Insert the primitives
|
Modifier and Type | Method and Description |
---|---|
void |
accept(Dump.IVisitor visitor)
Dump processing when a fatal error occurs
|
boolean |
areAllLintIgnored() |
boolean |
areInfoMessagesEnabled() |
boolean |
areSynchronizationPointcutsInUse() |
void |
classWriteEvent(char[][] compoundName) |
int |
compareByPrecedence(ResolvedType aspect1,
ResolvedType aspect2)
Same signature as org.aspectj.util.PartialOrder.PartialComparable.compareTo
|
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
|
boolean |
couldIncrementalCompileFollow() |
Advice |
createAdviceMunger(AdviceKind kind,
Pointcut p,
Member signature,
int extraParameterFlags,
IHasSourceLocation loc,
ResolvedType declaringAspect)
Create an advice shadow munger for the given advice kind
|
void |
demote()
Ask the type map to demote any types it can - we don't want them anchored forever.
|
void |
ensureAdvancedConfigurationProcessed() |
void |
flush()
be careful calling this - pr152257
|
void |
forgetTypeVariablesCurrentlyBeingProcessed(java.lang.Class<?> baseClass) |
TypePattern |
getAspectScope(ResolvedType declaringType) |
ResolvedType |
getCoreType(UnresolvedType tx)
Special resolution for "core" types like OBJECT.
|
CrosscuttingMembersSet |
getCrosscuttingMembersSet() |
ICrossReferenceHandler |
getCrossReferenceHandler()
Get the cross-reference handler for the world, may be null.
|
java.util.List<DeclareAnnotation> |
getDeclareAnnotationOnFields() |
java.util.List<DeclareAnnotation> |
getDeclareAnnotationOnMethods() |
java.util.List<DeclareAnnotation> |
getDeclareAnnotationOnTypes() |
java.util.List<DeclareParents> |
getDeclareParents() |
java.util.List<DeclareSoft> |
getDeclareSoft() |
java.util.List<DeclareTypeErrorOrWarning> |
getDeclareTypeEows() |
java.util.Map<ResolvedType,java.util.Set<ResolvedType>> |
getExclusionMap() |
java.util.Map<java.lang.String,java.lang.ref.Reference<ResolvedType>> |
getExpendable() |
java.util.Properties |
getExtraConfiguration()
may return null
|
java.util.Map<java.lang.String,ResolvedType> |
getFixed() |
int |
getItdVersion()
Returns the version of ITD that this world wants to create.
|
Lint |
getLint() |
IMessageHandler |
getMessageHandler()
Nobody should hold onto a copy of this message handler, or setMessageHandler won't work right.
|
IStructureModel |
getModel() |
java.lang.Integer |
getPrecedenceIfAny(ResolvedType aspect1,
ResolvedType aspect2) |
java.util.Set<PointcutDesignatorHandler> |
getRegisteredPointcutHandlers() |
RuntimeVersion |
getTargetAspectjRuntimeLevel() |
World.TypeMap |
getTypeMap() |
TypeVariableDeclaringElement |
getTypeVariableLookupScope() |
TypeVariable[] |
getTypeVariablesCurrentlyBeingProcessed(java.lang.Class<?> baseClass) |
abstract IWeavingSupport |
getWeavingSupport() |
boolean |
hasUnsatisfiedDependency(ResolvedType aspectType)
Determine if the named aspect requires a particular type around in order to be useful.
|
boolean |
isAddSerialVerUID() |
boolean |
isAspectIncluded(ResolvedType aspectType) |
boolean |
isDemotionActive() |
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 |
isHasMemberSupportEnabled() |
boolean |
isIgnoringUnusedDeclaredThrownException() |
boolean |
isInJava5Mode() |
boolean |
isInPinpointMode() |
boolean |
isJoinpointArrayConstructionEnabled() |
boolean |
isJoinpointSynchronizationEnabled() |
abstract boolean |
isLoadtimeWeaving() |
boolean |
isLocallyDefined(java.lang.String classname)
Return true if the classloader relating to this world is definetly the one that will define the specified class.
|
boolean |
isMinimalModel() |
boolean |
isOverWeaving() |
boolean |
isRunMinimalMemory() |
boolean |
isRunMinimalMemorySet() |
boolean |
isTargettingAspectJRuntime12() |
boolean |
isTargettingRuntime1_6_10() |
boolean |
isTimingEnabled() |
boolean |
isTransientTjpFields() |
boolean |
isXlazyTjp() |
boolean |
isXmlConfigured() |
boolean |
isXnoInline() |
ReferenceType |
lookupBySignature(java.lang.String signature)
Lookup a reference type in the world by its signature.
|
ReferenceType |
lookupOrCreateName(UnresolvedType ty)
Lookup a type by signature, if not found then build one and put it in the map.
|
void |
performExtraConfiguration(java.lang.String config) |
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.
|
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(java.lang.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 |
reportTimers() |
static void |
reset() |
ResolvedMember |
resolve(Member member)
Member resolution is achieved by resolving the declaring type and then looking up the member in the resolved declaring type.
|
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.
|
ResolvedType |
resolve(java.lang.String name)
Convenience method for finding a type by name and resolving it in one step.
|
ResolvedType |
resolve(java.lang.String name,
boolean allowMissing) |
ResolvedType |
resolve(UnresolvedType ty)
Resolve a type that we require to be present in the world
|
ResolvedType[] |
resolve(UnresolvedType[] types)
Convenience method for resolving an array of unresolved types in one hit.
|
ResolvedType |
resolve(UnresolvedType ty,
boolean allowMissing)
Resolve a type.
|
ResolvedType |
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 |
resolveDelegate(ReferenceType ty)
Find the ReferenceTypeDelegate behind this reference type so that it can fulfill its contract.
|
ResolvedType |
resolveGenericTypeFor(UnresolvedType anUnresolvedType,
boolean allowMissing)
Attempt to resolve a type that should be a generic type.
|
ReferenceType |
resolveToReferenceType(java.lang.String name) |
void |
setAddSerialVerUID(boolean b) |
void |
setAllLintIgnored() |
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 |
setLint(Lint lint) |
void |
setMessageHandler(IMessageHandler messageHandler) |
void |
setModel(IStructureModel model) |
void |
setOptionalJoinpoints(java.lang.String jps) |
void |
setPinpointMode(boolean b) |
void |
setSynchronizationPointcutsInUse() |
void |
setTargetAspectjRuntimeLevel(java.lang.String s) |
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 |
setTypeVariableLookupScope(TypeVariableDeclaringElement scope) |
void |
setXHasMemberSupportEnabled(boolean b) |
void |
setXlazyTjp(boolean b) |
void |
setXnoInline(boolean xnoInline) |
boolean |
shouldFastPackMethods() |
boolean |
shouldGenerateStackMaps() |
boolean |
shouldPipelineCompilation() |
void |
showMessage(IMessage.Kind kind,
java.lang.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) |
protected World.TypeMap typeMap
public static boolean createInjarHierarchy
public static final RuntimeVersion RUNTIME_LEVEL_DEFAULT
protected boolean bcelRepositoryCaching
public boolean forDEBUG_structuralChangesCode
public boolean forDEBUG_bridgingCode
public boolean optimizedMatching
public boolean generateNewLvts
protected long timersPerJoinpoint
protected long timersPerType
public int infoMessagesEnabled
public final org.aspectj.weaver.ResolvedType.Primitive BYTE
public final org.aspectj.weaver.ResolvedType.Primitive CHAR
public final org.aspectj.weaver.ResolvedType.Primitive DOUBLE
public final org.aspectj.weaver.ResolvedType.Primitive FLOAT
public final org.aspectj.weaver.ResolvedType.Primitive INT
public final org.aspectj.weaver.ResolvedType.Primitive LONG
public final org.aspectj.weaver.ResolvedType.Primitive SHORT
public final org.aspectj.weaver.ResolvedType.Primitive BOOLEAN
public final org.aspectj.weaver.ResolvedType.Primitive VOID
public static final java.lang.String xsetAVOID_FINAL
public static final java.lang.String xsetWEAVE_JAVA_PACKAGES
public static final java.lang.String xsetWEAVE_JAVAX_PACKAGES
public static final java.lang.String xsetCAPTURE_ALL_CONTEXT
public static final java.lang.String xsetRUN_MINIMAL_MEMORY
public static final java.lang.String xsetDEBUG_STRUCTURAL_CHANGES_CODE
public static final java.lang.String xsetDEBUG_BRIDGING
public static final java.lang.String xsetTRANSIENT_TJP_FIELDS
public static final java.lang.String xsetBCEL_REPOSITORY_CACHING
public static final java.lang.String xsetPIPELINE_COMPILATION
public static final java.lang.String xsetGENERATE_STACKMAPS
public static final java.lang.String xsetPIPELINE_COMPILATION_DEFAULT
public static final java.lang.String xsetCOMPLETE_BINARY_TYPES
public static final java.lang.String xsetCOMPLETE_BINARY_TYPES_DEFAULT
public static final java.lang.String xsetTYPE_DEMOTION
public static final java.lang.String xsetTYPE_DEMOTION_DEBUG
public static final java.lang.String xsetTYPE_REFS
public static final java.lang.String xsetBCEL_REPOSITORY_CACHING_DEFAULT
public static final java.lang.String xsetFAST_PACK_METHODS
public static final java.lang.String xsetOVERWEAVING
public static final java.lang.String xsetOPTIMIZED_MATCHING
public static final java.lang.String xsetTIMERS_PER_JOINPOINT
public static final java.lang.String xsetTIMERS_PER_FASTMATCH_CALL
public static final java.lang.String xsetITD_VERSION
public static final java.lang.String xsetITD_VERSION_ORIGINAL
public static final java.lang.String xsetITD_VERSION_2NDGEN
public static final java.lang.String xsetITD_VERSION_DEFAULT
public static final java.lang.String xsetMINIMAL_MODEL
public static final java.lang.String xsetTARGETING_RUNTIME_1610
public static final java.lang.String xsetGENERATE_NEW_LVTS
public void accept(Dump.IVisitor visitor)
accept
in interface Dump.INode
public ResolvedType resolve(UnresolvedType ty)
public ResolvedType resolve(UnresolvedType ty, ISourceLocation isl)
public ResolvedType[] resolve(UnresolvedType[] types)
public ResolvedType resolve(UnresolvedType ty, boolean allowMissing)
protected void completeBinaryType(ResolvedType ret)
public boolean isLocallyDefined(java.lang.String classname)
public ResolvedType resolve(ResolvedType ty)
public ResolvedType resolve(java.lang.String name)
public ReferenceType resolveToReferenceType(java.lang.String name)
public ResolvedType resolve(java.lang.String name, boolean allowMissing)
public ResolvedType resolveGenericTypeFor(UnresolvedType anUnresolvedType, boolean allowMissing)
protected abstract ReferenceTypeDelegate resolveDelegate(ReferenceType ty)
public ResolvedType getCoreType(UnresolvedType tx)
public ReferenceType lookupOrCreateName(UnresolvedType ty)
public ReferenceType lookupBySignature(java.lang.String signature)
public ResolvedMember resolve(Member member)
public void setAllLintIgnored()
public boolean areAllLintIgnored()
public abstract IWeavingSupport getWeavingSupport()
public final Advice createAdviceMunger(AdviceKind kind, Pointcut p, Member signature, int extraParameterFlags, IHasSourceLocation loc, ResolvedType declaringAspect)
public int compareByPrecedence(ResolvedType aspect1, ResolvedType aspect2)
public java.lang.Integer getPrecedenceIfAny(ResolvedType aspect1, ResolvedType aspect2)
public int compareByPrecedenceAndHierarchy(ResolvedType aspect1, ResolvedType aspect2)
public IMessageHandler getMessageHandler()
public void setMessageHandler(IMessageHandler messageHandler)
public void showMessage(IMessage.Kind kind, java.lang.String message, ISourceLocation loc1, ISourceLocation loc2)
public void setCrossReferenceHandler(ICrossReferenceHandler xrefHandler)
public ICrossReferenceHandler getCrossReferenceHandler()
public void setTypeVariableLookupScope(TypeVariableDeclaringElement scope)
public TypeVariableDeclaringElement getTypeVariableLookupScope()
public java.util.List<DeclareParents> getDeclareParents()
public java.util.List<DeclareAnnotation> getDeclareAnnotationOnTypes()
public java.util.List<DeclareAnnotation> getDeclareAnnotationOnFields()
public java.util.List<DeclareAnnotation> getDeclareAnnotationOnMethods()
public java.util.List<DeclareTypeErrorOrWarning> getDeclareTypeEows()
public java.util.List<DeclareSoft> getDeclareSoft()
public CrosscuttingMembersSet getCrosscuttingMembersSet()
public IStructureModel getModel()
public void setModel(IStructureModel model)
public Lint getLint()
public void setLint(Lint lint)
public boolean isXnoInline()
public void setXnoInline(boolean xnoInline)
public boolean isXlazyTjp()
public void setXlazyTjp(boolean b)
public boolean isHasMemberSupportEnabled()
public void setXHasMemberSupportEnabled(boolean b)
public boolean isInPinpointMode()
public void setPinpointMode(boolean b)
public boolean useFinal()
public boolean isMinimalModel()
public boolean isTargettingRuntime1_6_10()
public void setBehaveInJava5Way(boolean b)
public void setTiming(boolean timersOn, boolean reportPeriodically)
public void setErrorAndWarningThreshold(boolean errorThreshold, boolean warningThreshold)
errorThreshold
- warningThreshold
- public boolean isIgnoringUnusedDeclaredThrownException()
public void performExtraConfiguration(java.lang.String config)
public boolean areInfoMessagesEnabled()
public java.util.Properties getExtraConfiguration()
public boolean isInJava5Mode()
public boolean isTimingEnabled()
public void setTargetAspectjRuntimeLevel(java.lang.String s)
public void setOptionalJoinpoints(java.lang.String jps)
public boolean isJoinpointArrayConstructionEnabled()
public boolean isJoinpointSynchronizationEnabled()
public RuntimeVersion getTargetAspectjRuntimeLevel()
public boolean isTargettingAspectJRuntime12()
public void validateType(UnresolvedType type)
public boolean isDemotionActive()
public TypeVariable[] getTypeVariablesCurrentlyBeingProcessed(java.lang.Class<?> baseClass)
public void recordTypeVariablesCurrentlyBeingProcessed(java.lang.Class<?> baseClass, TypeVariable[] typeVariables)
public void forgetTypeVariablesCurrentlyBeingProcessed(java.lang.Class<?> baseClass)
public void setAddSerialVerUID(boolean b)
public boolean isAddSerialVerUID()
public void flush()
public void ensureAdvancedConfigurationProcessed()
public boolean isRunMinimalMemory()
public boolean isTransientTjpFields()
public boolean isRunMinimalMemorySet()
public boolean shouldFastPackMethods()
public boolean shouldPipelineCompilation()
public boolean shouldGenerateStackMaps()
public void setIncrementalCompileCouldFollow(boolean b)
public boolean couldIncrementalCompileFollow()
public void setSynchronizationPointcutsInUse()
public boolean areSynchronizationPointcutsInUse()
public void registerPointcutHandler(PointcutDesignatorHandler designatorHandler)
designatorHandler
- handler for the new pointcutpublic java.util.Set<PointcutDesignatorHandler> getRegisteredPointcutHandlers()
public void reportMatch(ShadowMunger munger, Shadow shadow)
public boolean isOverWeaving()
public boolean isXmlConfigured()
public boolean isAspectIncluded(ResolvedType aspectType)
public boolean hasUnsatisfiedDependency(ResolvedType aspectType)
public TypePattern getAspectScope(ResolvedType declaringType)
public java.util.Map<java.lang.String,ResolvedType> getFixed()
public java.util.Map<java.lang.String,java.lang.ref.Reference<ResolvedType>> getExpendable()
public void demote()
protected boolean isExpendable(ResolvedType type)
public java.util.Map<ResolvedType,java.util.Set<ResolvedType>> getExclusionMap()
public void record(Pointcut pointcut, long timetaken)
public void recordFastMatch(Pointcut pointcut, long timetaken)
public void reportTimers()
public World.TypeMap getTypeMap()
public static void reset()
public int getItdVersion()
public abstract boolean isLoadtimeWeaving()
public void classWriteEvent(char[][] compoundName)