Package org.aspectj.weaver.bcel
Class BcelWorld
java.lang.Object
org.aspectj.weaver.World
org.aspectj.weaver.bcel.BcelWorld
- All Implemented Interfaces:
Repository
,Dump.INode
- Direct Known Subclasses:
LTWWorld
-
Nested Class Summary
Nested classes/interfaces inherited from class org.aspectj.weaver.World
World.TypeMap
-
Field Summary
Fields inherited from class org.aspectj.weaver.World
bcelRepositoryCaching, BOOLEAN, BYTE, CHAR, createInjarHierarchy, DOUBLE, FLOAT, forDEBUG_bridgingCode, forDEBUG_structuralChangesCode, generateNewLvts, infoMessagesEnabled, INT, LONG, optimizedMatching, RUNTIME_LEVEL_DEFAULT, SHORT, timersPerJoinpoint, timersPerType, typeMap, VOID, xsetAVOID_FINAL, xsetBCEL_REPOSITORY_CACHING, xsetBCEL_REPOSITORY_CACHING_DEFAULT, xsetCAPTURE_ALL_CONTEXT, xsetCOMPLETE_BINARY_TYPES, xsetCOMPLETE_BINARY_TYPES_DEFAULT, xsetDEBUG_BRIDGING, xsetDEBUG_STRUCTURAL_CHANGES_CODE, xsetFAST_PACK_METHODS, xsetGENERATE_NEW_LVTS, xsetGENERATE_STACKMAPS, xsetITD_VERSION, xsetITD_VERSION_2NDGEN, xsetITD_VERSION_DEFAULT, xsetITD_VERSION_ORIGINAL, xsetMINIMAL_MODEL, xsetOPTIMIZED_MATCHING, xsetOVERWEAVING, xsetPIPELINE_COMPILATION, xsetPIPELINE_COMPILATION_DEFAULT, xsetRUN_MINIMAL_MEMORY, xsetTARGETING_RUNTIME_1610, xsetTIMERS_PER_FASTMATCH_CALL, xsetTIMERS_PER_JOINPOINT, xsetTRANSIENT_TJP_FIELDS, xsetTYPE_DEMOTION, xsetTYPE_DEMOTION_DEBUG, xsetTYPE_REFS, xsetWEAVE_JAVA_PACKAGES, xsetWEAVE_JAVAX_PACKAGES
-
Constructor Summary
ConstructorDescriptionBcelWorld(ClassLoader loader, IMessageHandler handler, ICrossReferenceHandler xrefHandler)
Build a World from a ClassLoader, for LTW supportBcelWorld(List classPath, IMessageHandler handler, ICrossReferenceHandler xrefHandler)
BcelWorld(ClassPathManager cpm, IMessageHandler handler, ICrossReferenceHandler xrefHandler)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAspectRequires(String aspectClassName, String requiredType)
void
void
addScopedAspect(String name, String scope)
Add a scoped aspects where the scoping was defined in an aop.xml file and this world is being used in a LTW configurationaddSourceObjectType(String classname, byte[] bytes, boolean artificial)
addSourceObjectType(String classname, JavaClass jc, boolean artificial)
addSourceObjectType(JavaClass jc, boolean artificial)
void
addTypeDelegateResolver(TypeDelegateResolver typeDelegateResolver)
buildBcelDelegate(ReferenceType type, JavaClass jc, boolean artificial, boolean exposedToWeaver)
void
classWriteEvent(char[][] compoundName)
void
clear()
Clear all entries from cache.void
demote(ResolvedType type)
Force demote a type.determineRelKind(ShadowMunger munger)
void
Find the class with the name provided, if the class isn't there, return NULL.static UnresolvedType
getAspectScope(ResolvedType declaringType)
static BcelObjectType
getBcelObjectType(ResolvedType concreteAspect)
Retrieve a bcel delegate for an aspect - this will return NULL if the delegate is an EclipseSourceType and not a BcelObjectType - this happens quite often when incrementally compiling.org.aspectj.weaver.bcel.BcelWorld.WeavingXmlConfig
boolean
hasUnsatisfiedDependency(ResolvedType aspectType)
Determine if the named aspect requires a particular type around in order to be useful.boolean
isAspectIncluded(ResolvedType aspectType)
boolean
boolean
Find the JavaClass instance for the given run-time class objectFind the class with the name provided, if the class isn't there, make an attempt to load it.static Type
makeBcelType(String type)
static Type
makeBcelType(UnresolvedType type)
static Type[]
makeBcelTypes(String[] types)
static Member
void
removeClass(JavaClass clazz)
Remove class from repositoryvoid
reportCheckerMatch(Checker checker, Shadow shadow)
void
reportMatch(ShadowMunger munger, Shadow shadow)
protected ReferenceTypeDelegate
Find the ReferenceTypeDelegate behind this reference type so that it can fulfill its contract.void
setXmlConfigured(boolean b)
void
setXmlFiles(List<File> xmlFiles)
These are aop.xml files that can be used to alter the aspects that actually apply from those passed in - and also their scope of application to other files in the system.void
storeClass(JavaClass clazz)
Store the provided class under "clazz.getClassName()"void
tidyUp()
toString()
void
validateType(UnresolvedType type)
The aim of this method is to make sure a particular type is 'ok'.protected void
weaveInterTypeDeclarations(ResolvedType onType)
Methods inherited from class org.aspectj.weaver.World
accept, areAllLintIgnored, areInfoMessagesEnabled, areSynchronizationPointcutsInUse, compareByPrecedence, compareByPrecedenceAndHierarchy, completeBinaryType, couldIncrementalCompileFollow, createAdviceMunger, demote, ensureAdvancedConfigurationProcessed, flush, forgetTypeVariablesCurrentlyBeingProcessed, getCoreType, getCrosscuttingMembersSet, getCrossReferenceHandler, getDeclareAnnotationOnFields, getDeclareAnnotationOnMethods, getDeclareAnnotationOnTypes, getDeclareParents, getDeclareSoft, getDeclareTypeEows, getExclusionMap, getExpendable, getExtraConfiguration, getFixed, getItdVersion, getLint, getMessageHandler, getModel, getPrecedenceIfAny, getRegisteredPointcutHandlers, getTargetAspectjRuntimeLevel, getTypeVariableLookupScope, getTypeVariablesCurrentlyBeingProcessed, isAddSerialVerUID, isDemotionActive, isExpendable, isHasMemberSupportEnabled, isIgnoringUnusedDeclaredThrownException, isInJava5Mode, isInPinpointMode, isJoinpointArrayConstructionEnabled, isJoinpointSynchronizationEnabled, isLocallyDefined, isMinimalModel, isOverWeaving, isRunMinimalMemory, isRunMinimalMemorySet, isTargettingAspectJRuntime12, isTargettingRuntime1_6_10, isTimingEnabled, isTransientTjpFields, isXlazyTjp, isXnoInline, lookupBySignature, lookupOrCreateName, performExtraConfiguration, record, recordFastMatch, recordTypeVariablesCurrentlyBeingProcessed, registerPointcutHandler, reportTimers, reset, resolve, resolve, resolve, resolve, resolve, resolve, resolve, resolve, resolveGenericTypeFor, resolveToReferenceType, setAddSerialVerUID, setAllLintIgnored, setBehaveInJava5Way, setCrossReferenceHandler, setErrorAndWarningThreshold, setIncrementalCompileCouldFollow, setLint, setMessageHandler, setModel, setOptionalJoinpoints, setPinpointMode, setSynchronizationPointcutsInUse, setTargetAspectjRuntimeLevel, setTiming, setTypeVariableLookupScope, setXHasMemberSupportEnabled, setXlazyTjp, setXnoInline, shouldFastPackMethods, shouldGenerateStackMaps, shouldPipelineCompilation, showMessage, useFinal
-
Field Details
-
delegate
-
-
Constructor Details
-
BcelWorld
public BcelWorld() -
BcelWorld
-
BcelWorld
-
BcelWorld
public BcelWorld(ClassPathManager cpm, IMessageHandler handler, ICrossReferenceHandler xrefHandler) -
BcelWorld
Build a World from a ClassLoader, for LTW support- Parameters:
loader
-handler
-xrefHandler
-
-
-
Method Details
-
determineRelKind
-
reportMatch
- Overrides:
reportMatch
in classWorld
-
ensureRepositorySetup
public void ensureRepositorySetup() -
getClassLoaderRepositoryFor
-
addPath
-
makeBcelType
-
makeBcelTypes
-
makeBcelType
-
fromBcel
-
resolve
-
resolveDelegate
Description copied from class:World
Find the ReferenceTypeDelegate behind this reference type so that it can fulfill its contract.- Specified by:
resolveDelegate
in classWorld
-
buildBcelDelegate
public BcelObjectType buildBcelDelegate(ReferenceType type, JavaClass jc, boolean artificial, boolean exposedToWeaver) -
addSourceObjectType
-
addSourceObjectType
-
addSourceObjectType
-
makeFieldJoinPointSignature
-
makeJoinPointSignatureFromMethod
-
makeJoinPointSignatureForMonitorEnter
-
makeJoinPointSignatureForMonitorExit
-
makeJoinPointSignatureForArrayConstruction
public Member makeJoinPointSignatureForArrayConstruction(LazyClassGen cg, InstructionHandle handle) -
makeJoinPointSignatureForMethodInvocation
-
toString
-
getBcelObjectType
Retrieve a bcel delegate for an aspect - this will return NULL if the delegate is an EclipseSourceType and not a BcelObjectType - this happens quite often when incrementally compiling. -
tidyUp
public void tidyUp() -
findClass
Description copied from interface:Repository
Find the class with the name provided, if the class isn't there, return NULL.- Specified by:
findClass
in interfaceRepository
-
loadClass
Description copied from interface:Repository
Find the class with the name provided, if the class isn't there, make an attempt to load it.- Specified by:
loadClass
in interfaceRepository
- Throws:
ClassNotFoundException
-
storeClass
Description copied from interface:Repository
Store the provided class under "clazz.getClassName()"- Specified by:
storeClass
in interfaceRepository
-
removeClass
Description copied from interface:Repository
Remove class from repository- Specified by:
removeClass
in interfaceRepository
-
loadClass
Description copied from interface:Repository
Find the JavaClass instance for the given run-time class object- Specified by:
loadClass
in interfaceRepository
- Throws:
ClassNotFoundException
-
clear
public void clear()Description copied from interface:Repository
Clear all entries from cache.- Specified by:
clear
in interfaceRepository
-
validateType
The aim of this method is to make sure a particular type is 'ok'. Some operations on the delegate for a type modify it and this method is intended to undo that... see pr85132- Overrides:
validateType
in classWorld
-
weaveInterTypeDeclarations
-
getWeavingSupport
- Specified by:
getWeavingSupport
in classWorld
-
reportCheckerMatch
- Overrides:
reportCheckerMatch
in classWorld
-
getModelAsAsmManager
-
setXmlFiles
These are aop.xml files that can be used to alter the aspects that actually apply from those passed in - and also their scope of application to other files in the system.- Parameters:
xmlFiles
- list of File objects representing any aop.xml files passed in to configure the build process
-
addScopedAspect
Add a scoped aspects where the scoping was defined in an aop.xml file and this world is being used in a LTW configuration -
setXmlConfigured
public void setXmlConfigured(boolean b) -
isXmlConfigured
public boolean isXmlConfigured()- Overrides:
isXmlConfigured
in classWorld
- Returns:
- true if this world has the activation and scope of application of the aspects controlled via aop.xml files
-
getXmlConfiguration
public org.aspectj.weaver.bcel.BcelWorld.WeavingXmlConfig getXmlConfiguration() -
isAspectIncluded
- Overrides:
isAspectIncluded
in classWorld
-
getAspectScope
- Overrides:
getAspectScope
in classWorld
-
hasUnsatisfiedDependency
Description copied from class:World
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.- Overrides:
hasUnsatisfiedDependency
in classWorld
- Returns:
- true if there is a type missing that this aspect really needed around
-
addAspectRequires
-
getTypeMap
- Overrides:
getTypeMap
in classWorld
-
isLoadtimeWeaving
public boolean isLoadtimeWeaving()- Specified by:
isLoadtimeWeaving
in classWorld
-
addTypeDelegateResolver
-
classWriteEvent
public void classWriteEvent(char[][] compoundName)- Overrides:
classWriteEvent
in classWorld
-
demote
Force demote a type.
-