public abstract class WeaveEnvironment extends Object
Modifier and Type | Class and Description |
---|---|
class |
WeaveEnvironment.Resource
Represents a
WeaveEnvironment resource. |
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.
|
WeaveEnvironment.Resource |
getClassfile(Class<?> cls)
Get a
WeaveEnvironment.Resource representing cls . |
WeaveEnvironment.Resource |
getClassfile(String classname)
Get a
WeaveEnvironment.Resource for the specified class. |
protected abstract OutputStream |
getOutputStream(String resourceName)
Open an
OutputStream for the specified resource. |
WeaveEnvironment.Resource |
getResource(String name)
Get a
WeaveEnvironment.Resource 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
- propertyprotected static String getResourceName(String classname)
classname
- to convertpublic 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 WeaveEnvironment.Resource getClassfile(Class<?> cls)
WeaveEnvironment.Resource
representing cls
.cls
- typeWeaveEnvironment.Resource
public final WeaveEnvironment.Resource getClassfile(String classname)
WeaveEnvironment.Resource
for the specified class.classname
- of typeWeaveEnvironment.Resource
public final WeaveEnvironment.Resource getResource(String name)
WeaveEnvironment.Resource
for the specified resource.name
- of resourceWeaveEnvironment.Resource
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 errorCopyright © 2018 The Apache Software Foundation. All rights reserved.