Package org.aspectj.weaver.reflect
Class ReflectionWorld
java.lang.Object
org.aspectj.weaver.World
org.aspectj.weaver.reflect.ReflectionWorld
- All Implemented Interfaces:
Dump.INode
,IReflectionWorld
A ReflectionWorld is used solely for purposes of type resolution based on the runtime classpath (java.lang.reflect). It does not
support weaving operations (creation of mungers etc..).
- Author:
- Adrian Colyer, Andy Clement
-
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
ConstructorDescriptionReflectionWorld(boolean forceUseOf14Delegates, ClassLoader aClassLoader)
ReflectionWorld(ClassLoader aClassLoader)
ReflectionWorld(WeakClassLoaderReference classloaderRef)
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static ReflectionWorld
getReflectionWorldFor(WeakClassLoaderReference classLoaderReference)
boolean
static AnnotationFinder
makeAnnotationFinderIfAny(ClassLoader loader, World world)
static ResolvedType
protected ReferenceTypeDelegate
Find the ReferenceTypeDelegate behind this reference type so that it can fulfill its contract.resolveUsingClass(Class<?> clazz)
Resolve a type using the specified class.Methods inherited from class org.aspectj.weaver.World
accept, areAllLintIgnored, areInfoMessagesEnabled, areSynchronizationPointcutsInUse, classWriteEvent, compareByPrecedence, compareByPrecedenceAndHierarchy, completeBinaryType, couldIncrementalCompileFollow, createAdviceMunger, demote, ensureAdvancedConfigurationProcessed, flush, forgetTypeVariablesCurrentlyBeingProcessed, getAspectScope, getCoreType, getCrosscuttingMembersSet, getCrossReferenceHandler, getDeclareAnnotationOnFields, getDeclareAnnotationOnMethods, getDeclareAnnotationOnTypes, getDeclareParents, getDeclareSoft, getDeclareTypeEows, getExclusionMap, getExpendable, getExtraConfiguration, getFixed, getItdVersion, getLint, getMessageHandler, getModel, getPrecedenceIfAny, getRegisteredPointcutHandlers, getTargetAspectjRuntimeLevel, getTypeMap, getTypeVariableLookupScope, getTypeVariablesCurrentlyBeingProcessed, hasUnsatisfiedDependency, isAddSerialVerUID, isAspectIncluded, isDemotionActive, isExpendable, isHasMemberSupportEnabled, isIgnoringUnusedDeclaredThrownException, isInJava5Mode, isInPinpointMode, isJoinpointArrayConstructionEnabled, isJoinpointSynchronizationEnabled, isLocallyDefined, isMinimalModel, isOverWeaving, isRunMinimalMemory, isRunMinimalMemorySet, isTargettingAspectJRuntime12, isTargettingRuntime1_6_10, isTimingEnabled, isTransientTjpFields, isXlazyTjp, isXmlConfigured, isXnoInline, lookupBySignature, lookupOrCreateName, performExtraConfiguration, record, recordFastMatch, recordTypeVariablesCurrentlyBeingProcessed, registerPointcutHandler, reportCheckerMatch, reportMatch, 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, validateType
-
Constructor Details
-
ReflectionWorld
-
ReflectionWorld
-
ReflectionWorld
-
-
Method Details
-
getReflectionWorldFor
-
cleanUpWorlds
public static void cleanUpWorlds() -
makeAnnotationFinderIfAny
-
getClassLoader
-
getAnnotationFinder
- Specified by:
getAnnotationFinder
in interfaceIReflectionWorld
-
resolve
- Specified by:
resolve
in interfaceIReflectionWorld
-
resolve
-
resolveUsingClass
Resolve a type using the specified class. Normal resolution in a reflection world uses Class.forName() via the classloader (attached to this world) in order to find a named type then builds a reference type and a reference type delegate based on that. For some classes generated at runtime (e.g. proxy or lambda representation) the forName() call will not work. In those situations we should just use the clazz we have. Should the whole thing switch from using forName() to using the clazz objects? Possibly but that introduces a lot of change and we don't have a lot of test coverage for this scenario (reflection world). What we are doing right now is that this can optionally be used if the regular resolution scheme did not work. Although AspectJ is *not* multi threaded or re-entrant, Spring doesn't always respect that. There might be an issue here if two attempts are made to resolve the same thing at the same time via this method.- Parameters:
clazz
- the class to use as the delegate for the resolved type
-
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
-
getWeavingSupport
- Specified by:
getWeavingSupport
in classWorld
-
isLoadtimeWeaving
public boolean isLoadtimeWeaving()- Specified by:
isLoadtimeWeaving
in classWorld
-