Klasse BcelWeaver

java.lang.Object
org.aspectj.weaver.bcel.BcelWeaver

public class BcelWeaver extends Object
Autor:
PARC, Andy Clement, Alexandre Vasseur
  • Felddetails

  • Konstruktordetails

    • BcelWeaver

      public BcelWeaver(BcelWorld world)
  • Methodendetails

    • addLibraryAspect

      public ResolvedType addLibraryAspect(String aspectName)
      Add the given aspect to the weaver. The type is resolved to support DOT for static inner classes as well as DOLLAR
      Parameter:
      aspectName -
      Gibt zurück:
      aspect
    • addLibraryJarFile

      public void addLibraryJarFile(File inFile) throws IOException
      Parameter:
      inFile - directory containing classes or zip/jar class archive
      Löst aus:
      IOException
    • addDirectoryContents

      public List<UnwovenClassFile> addDirectoryContents(File inFile, File outDir) throws IOException
      Add any .class files in the directory to the outdir. Anything other than .class files in the directory (or its subdirectories) are considered resources and are also copied.
      Löst aus:
      IOException
    • addJarFile

      public List<UnwovenClassFile> addJarFile(File inFile, File outDir, boolean canBeDirectory)
      Adds all class files in the jar
    • needToReweaveWorld

      public boolean needToReweaveWorld()
    • addClassFile

      public ReferenceType addClassFile(UnwovenClassFile classFile, boolean fromInpath)
      Should be addOrReplace
    • addClassFile

      public UnwovenClassFile addClassFile(File classFile, File inPathDir, File outDir) throws IOException
      Löst aus:
      IOException
    • deleteClassFile

      public void deleteClassFile(String typename)
    • setIsBatchWeave

      public void setIsBatchWeave(boolean b)
    • prepareForWeave

      public void prepareForWeave()
    • setCustomMungerFactory

      public void setCustomMungerFactory(CustomMungerFactory factory)
    • addManifest

      public void addManifest(Manifest newManifest)
    • getManifest

      public Manifest getManifest(boolean shouldCreate)
    • weave

      public Collection<String> weave(File file) throws IOException
      Löst aus:
      IOException
    • weave

      public Collection<String> weave(IClassFileProvider input) throws IOException
      Löst aus:
      IOException
    • allWeavingComplete

      public void allWeavingComplete()
    • prepareToProcessReweavableState

      public void prepareToProcessReweavableState()
    • processReweavableStateIfPresent

      public void processReweavableStateIfPresent(String className, BcelObjectType classType)
    • getClassType

      public BcelObjectType getClassType(String forClass)
      helper method - will return NULL if the underlying delegate is an EclipseSourceType and not a BcelObjectType
    • addParentTypeMungers

      public void addParentTypeMungers(String typeName)
    • addNormalTypeMungers

      public void addNormalTypeMungers(String typeName)
    • getClassFilesFor

      public UnwovenClassFile[] getClassFilesFor(LazyClassGen clazz)
    • weaveParentTypeMungers

      public void weaveParentTypeMungers(ResolvedType onType)
      Weaves new parents and annotations onto a type ("declare parents" and "declare @type") Algorithm: 1. First pass, do parents then do annotations. During this pass record: - any parent mungers that don't match but have a non-wild annotation type pattern - any annotation mungers that don't match 2. Multiple subsequent passes which go over the munger lists constructed in the first pass, repeatedly applying them until nothing changes. FIXME asc confirm that algorithm is optimal ??
    • weaveNormalTypeMungers

      public void weaveNormalTypeMungers(ResolvedType onType)
    • weaveWithoutDump

      public LazyClassGen weaveWithoutDump(UnwovenClassFile classFile, BcelObjectType classType) throws IOException
      Löst aus:
      IOException
    • setReweavableMode

      public void setReweavableMode(boolean xNotReweavable)
    • isReweavable

      public boolean isReweavable()
    • getWorld

      public World getWorld()
    • tidyUp

      public void tidyUp()
    • write

      public void write(CompressingDataOutputStream dos) throws IOException
      Löst aus:
      IOException
    • setShadowMungers

      public void setShadowMungers(List<ShadowMunger> shadowMungers)