public class BcelWeaver
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLOSURE_CLASS_PREFIX |
static java.lang.String |
SYNTHETIC_CLASS_POSTFIX |
Constructor and Description |
---|
BcelWeaver(BcelWorld world) |
Modifier and Type | Method and Description |
---|---|
UnwovenClassFile |
addClassFile(java.io.File classFile,
java.io.File inPathDir,
java.io.File outDir) |
ReferenceType |
addClassFile(UnwovenClassFile classFile,
boolean fromInpath)
Should be addOrReplace
|
java.util.List<UnwovenClassFile> |
addDirectoryContents(java.io.File inFile,
java.io.File outDir)
Add any .class files in the directory to the outdir.
|
java.util.List<UnwovenClassFile> |
addJarFile(java.io.File inFile,
java.io.File outDir,
boolean canBeDirectory)
Adds all class files in the jar
|
ResolvedType |
addLibraryAspect(java.lang.String aspectName)
Add the given aspect to the weaver.
|
void |
addLibraryJarFile(java.io.File inFile) |
void |
addManifest(java.util.jar.Manifest newManifest) |
void |
addNormalTypeMungers(java.lang.String typeName) |
void |
addParentTypeMungers(java.lang.String typeName) |
void |
allWeavingComplete() |
void |
deleteClassFile(java.lang.String typename) |
UnwovenClassFile[] |
getClassFilesFor(LazyClassGen clazz) |
BcelObjectType |
getClassType(java.lang.String forClass)
helper method - will return NULL if the underlying delegate is an EclipseSourceType and not a BcelObjectType
|
java.util.jar.Manifest |
getManifest(boolean shouldCreate) |
World |
getWorld() |
boolean |
isReweavable() |
boolean |
needToReweaveWorld() |
void |
prepareForWeave() |
void |
prepareToProcessReweavableState() |
void |
processReweavableStateIfPresent(java.lang.String className,
BcelObjectType classType) |
void |
setCustomMungerFactory(CustomMungerFactory factory) |
void |
setIsBatchWeave(boolean b) |
void |
setReweavableMode(boolean xNotReweavable) |
void |
setShadowMungers(java.util.List<ShadowMunger> shadowMungers) |
void |
tidyUp() |
java.util.Collection<java.lang.String> |
weave(java.io.File file) |
java.util.Collection<java.lang.String> |
weave(IClassFileProvider input) |
void |
weaveNormalTypeMungers(ResolvedType onType) |
void |
weaveParentTypeMungers(ResolvedType onType)
Weaves new parents and annotations onto a type ("declare parents" and "declare @type")
Algorithm: 1.
|
LazyClassGen |
weaveWithoutDump(UnwovenClassFile classFile,
BcelObjectType classType) |
void |
write(CompressingDataOutputStream dos) |
public static final java.lang.String CLOSURE_CLASS_PREFIX
public static final java.lang.String SYNTHETIC_CLASS_POSTFIX
public BcelWeaver(BcelWorld world)
public ResolvedType addLibraryAspect(java.lang.String aspectName)
aspectName
- public void addLibraryJarFile(java.io.File inFile) throws java.io.IOException
inFile
- directory containing classes or zip/jar class archivejava.io.IOException
public java.util.List<UnwovenClassFile> addDirectoryContents(java.io.File inFile, java.io.File outDir) throws java.io.IOException
java.io.IOException
public java.util.List<UnwovenClassFile> addJarFile(java.io.File inFile, java.io.File outDir, boolean canBeDirectory)
public boolean needToReweaveWorld()
public ReferenceType addClassFile(UnwovenClassFile classFile, boolean fromInpath)
public UnwovenClassFile addClassFile(java.io.File classFile, java.io.File inPathDir, java.io.File outDir) throws java.io.IOException
java.io.IOException
public void deleteClassFile(java.lang.String typename)
public void setIsBatchWeave(boolean b)
public void prepareForWeave()
public void setCustomMungerFactory(CustomMungerFactory factory)
public void addManifest(java.util.jar.Manifest newManifest)
public java.util.jar.Manifest getManifest(boolean shouldCreate)
public java.util.Collection<java.lang.String> weave(java.io.File file) throws java.io.IOException
java.io.IOException
public java.util.Collection<java.lang.String> weave(IClassFileProvider input) throws java.io.IOException
java.io.IOException
public void allWeavingComplete()
public void prepareToProcessReweavableState()
public void processReweavableStateIfPresent(java.lang.String className, BcelObjectType classType)
public BcelObjectType getClassType(java.lang.String forClass)
public void addParentTypeMungers(java.lang.String typeName)
public void addNormalTypeMungers(java.lang.String typeName)
public UnwovenClassFile[] getClassFilesFor(LazyClassGen clazz)
public void weaveParentTypeMungers(ResolvedType onType)
public void weaveNormalTypeMungers(ResolvedType onType)
public LazyClassGen weaveWithoutDump(UnwovenClassFile classFile, BcelObjectType classType) throws java.io.IOException
java.io.IOException
public void setReweavableMode(boolean xNotReweavable)
public boolean isReweavable()
public World getWorld()
public void tidyUp()
public void write(CompressingDataOutputStream dos) throws java.io.IOException
java.io.IOException
public void setShadowMungers(java.util.List<ShadowMunger> shadowMungers)