public abstract class WeaveEnvironment extends Object
Modifier and Type | Field and Description |
---|---|
ClassLoader |
classLoader
ClassLoader containing scannable and weavable classes.
|
Properties |
config
Configuration properties.
|
Modifier | Constructor and Description |
---|---|
protected |
WeaveEnvironment(ClassLoader classLoader,
Properties config,
Logger log)
Create a new
WeaveEnvironment . |
Modifier and Type | Method and Description |
---|---|
void |
debug(String message,
Object... args)
Handle a debug message.
|
boolean |
deleteClassfile(Class<?> cls)
Delete the classfile for
cls . |
boolean |
deleteClassfile(String classname)
Delete the classfile for the specified class.
|
abstract boolean |
deleteResource(String name)
Delete the specified resource.
|
void |
error(String message,
Object... args)
Handle an error message.
|
DataSource |
getClassfile(Class<?> cls)
Get a
DataSource representing cls . |
DataSource |
getClassfile(String classname)
Get a
DataSource for the specified class. |
protected abstract OutputStream |
getOutputStream(String resourceName)
Open an
OutputStream for the specified resource. |
DataSource |
getResource(String name)
Get a
DataSource for the specified resource. |
protected static String |
getResourceName(String classname)
Convert a classname into a resource name.
|
void |
info(String message,
Object... args)
Handle an info message.
|
void |
verbose(String message,
Object... args)
Handle a verbose message.
|
void |
warn(String message,
Object... args)
Handle a warning message.
|
public final ClassLoader classLoader
public final Properties config
protected WeaveEnvironment(ClassLoader classLoader, Properties config, Logger log)
WeaveEnvironment
.classLoader
- propertyconfig
- propertylog
- propertypublic void debug(String message, Object... args)
message
- textargs
- formatString.format(String, Object...)
public void verbose(String message, Object... args)
message
- textargs
- formatString.format(String, Object...)
public void warn(String message, Object... args)
message
- textargs
- formatString.format(String, Object...)
public void info(String message, Object... args)
message
- textargs
- formatString.format(String, Object...)
public void error(String message, Object... args)
message
- textargs
- formatString.format(String, Object...)
public final DataSource getClassfile(Class<?> cls)
DataSource
representing cls
.cls
- typeDataSource
public final DataSource getClassfile(String classname)
DataSource
for the specified class.classname
- of typeDataSource
public final DataSource getResource(String name)
DataSource
for the specified resource.name
- of resourceDataSource
public final boolean deleteClassfile(Class<?> cls)
cls
.cls
- typepublic final boolean deleteClassfile(String classname)
classname
- of typepublic abstract boolean deleteResource(String name)
name
- to deleteprotected abstract OutputStream getOutputStream(String resourceName) throws IOException
OutputStream
for the specified resource.resourceName
- to openOutputStream
IOException
- on errorprotected static String getResourceName(String classname)
classname
- to convertCopyright © 2014 The Apache Software Foundation. All rights reserved.