Class BcelWorld

java.lang.Object
org.aspectj.weaver.World
org.aspectj.weaver.bcel.BcelWorld
All Implemented Interfaces:
Repository, Dump.INode
Direct Known Subclasses:
LTWWorld

public class BcelWorld extends World implements Repository
  • Field Details

  • Constructor Details

  • Method Details

    • determineRelKind

      public IRelationship.Kind determineRelKind(ShadowMunger munger)
    • reportMatch

      public void reportMatch(ShadowMunger munger, Shadow shadow)
      Overrides:
      reportMatch in class World
    • ensureRepositorySetup

      public void ensureRepositorySetup()
    • getClassLoaderRepositoryFor

      public Repository getClassLoaderRepositoryFor(ClassLoaderReference loader)
    • addPath

      public void addPath(String name)
    • makeBcelType

      public static Type makeBcelType(UnresolvedType type)
    • makeBcelTypes

      public static Type[] makeBcelTypes(String[] types)
    • makeBcelType

      public static Type makeBcelType(String type)
    • fromBcel

      public static UnresolvedType fromBcel(Type t)
    • resolve

      public ResolvedType resolve(Type t)
    • resolveDelegate

      protected ReferenceTypeDelegate resolveDelegate(ReferenceType ty)
      Description copied from class: World
      Find the ReferenceTypeDelegate behind this reference type so that it can fulfill its contract.
      Specified by:
      resolveDelegate in class World
    • buildBcelDelegate

      public BcelObjectType buildBcelDelegate(ReferenceType type, JavaClass jc, boolean artificial, boolean exposedToWeaver)
    • addSourceObjectType

      public BcelObjectType addSourceObjectType(JavaClass jc, boolean artificial)
    • addSourceObjectType

      public BcelObjectType addSourceObjectType(String classname, JavaClass jc, boolean artificial)
    • addSourceObjectType

      public BcelObjectType addSourceObjectType(String classname, byte[] bytes, boolean artificial)
    • makeFieldJoinPointSignature

      public static Member makeFieldJoinPointSignature(LazyClassGen cg, FieldInstruction fi)
    • makeJoinPointSignatureFromMethod

      public Member makeJoinPointSignatureFromMethod(LazyMethodGen mg, MemberKind kind)
    • makeJoinPointSignatureForMonitorEnter

      public Member makeJoinPointSignatureForMonitorEnter(LazyClassGen cg, InstructionHandle h)
    • makeJoinPointSignatureForMonitorExit

      public Member makeJoinPointSignatureForMonitorExit(LazyClassGen cg, InstructionHandle h)
    • makeJoinPointSignatureForArrayConstruction

      public Member makeJoinPointSignatureForArrayConstruction(LazyClassGen cg, InstructionHandle handle)
    • makeJoinPointSignatureForMethodInvocation

      public Member makeJoinPointSignatureForMethodInvocation(LazyClassGen cg, InvokeInstruction ii)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getBcelObjectType

      public 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.
    • tidyUp

      public void tidyUp()
    • findClass

      public JavaClass findClass(String className)
      Description copied from interface: Repository
      Find the class with the name provided, if the class isn't there, return NULL.
      Specified by:
      findClass in interface Repository
    • loadClass

      public JavaClass loadClass(String className) throws ClassNotFoundException
      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 interface Repository
      Throws:
      ClassNotFoundException
    • storeClass

      public void storeClass(JavaClass clazz)
      Description copied from interface: Repository
      Store the provided class under "clazz.getClassName()"
      Specified by:
      storeClass in interface Repository
    • removeClass

      public void removeClass(JavaClass clazz)
      Description copied from interface: Repository
      Remove class from repository
      Specified by:
      removeClass in interface Repository
    • loadClass

      public JavaClass loadClass(Class clazz) throws ClassNotFoundException
      Description copied from interface: Repository
      Find the JavaClass instance for the given run-time class object
      Specified by:
      loadClass in interface Repository
      Throws:
      ClassNotFoundException
    • clear

      public void clear()
      Description copied from interface: Repository
      Clear all entries from cache.
      Specified by:
      clear in interface Repository
    • validateType

      public void validateType(UnresolvedType type)
      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 class World
    • weaveInterTypeDeclarations

      protected void weaveInterTypeDeclarations(ResolvedType onType)
    • getWeavingSupport

      public IWeavingSupport getWeavingSupport()
      Specified by:
      getWeavingSupport in class World
    • reportCheckerMatch

      public void reportCheckerMatch(Checker checker, Shadow shadow)
      Overrides:
      reportCheckerMatch in class World
    • getModelAsAsmManager

      public AsmManager getModelAsAsmManager()
    • setXmlFiles

      public 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.
      Parameters:
      xmlFiles - list of File objects representing any aop.xml files passed in to configure the build process
    • addScopedAspect

      public 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 configuration
    • setXmlConfigured

      public void setXmlConfigured(boolean b)
    • isXmlConfigured

      public boolean isXmlConfigured()
      Overrides:
      isXmlConfigured in class World
      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

      public boolean isAspectIncluded(ResolvedType aspectType)
      Overrides:
      isAspectIncluded in class World
    • getAspectScope

      public TypePattern getAspectScope(ResolvedType declaringType)
      Overrides:
      getAspectScope in class World
    • hasUnsatisfiedDependency

      public boolean hasUnsatisfiedDependency(ResolvedType aspectType)
      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 class World
      Returns:
      true if there is a type missing that this aspect really needed around
    • addAspectRequires

      public void addAspectRequires(String aspectClassName, String requiredType)
    • getTypeMap

      public World.TypeMap getTypeMap()
      Overrides:
      getTypeMap in class World
    • isLoadtimeWeaving

      public boolean isLoadtimeWeaving()
      Specified by:
      isLoadtimeWeaving in class World
    • addTypeDelegateResolver

      public void addTypeDelegateResolver(TypeDelegateResolver typeDelegateResolver)
    • classWriteEvent

      public void classWriteEvent(char[][] compoundName)
      Overrides:
      classWriteEvent in class World
    • demote

      public void demote(ResolvedType type)
      Force demote a type.