org.codehaus.aspectwerkz.transform
Interface Context

All Known Implementing Classes:
ContextImpl

public interface Context

Interface for the different transformation context implementations. FIXME crap: abstract method on an interface. Refactor some in between if we are sure to keep the delegation model

Author:
Jonas Bonér

Method Summary
 void addMetaData(Object key, Object value)
          Adds new meta-data for the transformation.
 void dump(String dir)
          Dump the class to specific directory.
 Object getClassAbstraction()
          Returns the class abstraction.
 String getClassName()
           
 byte[] getCurrentBytecode()
          Returns the current bytecode.
 List getDefinitions()
          The definitions context (with hierarchical structure)
 byte[] getInitialBytecode()
          Returns the initial bytecode.
 ClassLoader getLoader()
          Returns the class loader.
 Object getMetaData(Object key)
          Returns meta-data for the transformation.
 boolean isAdvised()
          Checks if the class being transformed has beed advised.
 boolean isPrepared()
          Checks if the class is prepared.
 boolean isReadOnly()
          Checks if the context is read-only.
 void markAsAdvised()
          Marks the class being transformed as advised.
 void markAsPrepared()
          Marks the class as prepared.
 void markAsReadOnly()
          Marks the context as read-only.
 void resetAdvised()
          Resets the isAdviced flag.
 void setCurrentBytecode(byte[] bytecode)
          Sets the current bytecode.
 

Method Detail

getClassName

public String getClassName()

setCurrentBytecode

public void setCurrentBytecode(byte[] bytecode)
Sets the current bytecode.

Parameters:
bytecode -

getInitialBytecode

public byte[] getInitialBytecode()
Returns the initial bytecode.

Returns:
bytecode

getCurrentBytecode

public byte[] getCurrentBytecode()
Returns the current bytecode.

Returns:
bytecode

getClassAbstraction

public Object getClassAbstraction()
Returns the class abstraction.

Returns:
clazz

getLoader

public ClassLoader getLoader()
Returns the class loader.

Returns:
the class loader

getDefinitions

public List getDefinitions()
The definitions context (with hierarchical structure)

Returns:

markAsAdvised

public void markAsAdvised()
Marks the class being transformed as advised. The marker can at most be set once per class per transformer


markAsPrepared

public void markAsPrepared()
Marks the class as prepared.


resetAdvised

public void resetAdvised()
Resets the isAdviced flag.


isAdvised

public boolean isAdvised()
Checks if the class being transformed has beed advised.

Returns:
boolean

isPrepared

public boolean isPrepared()
Checks if the class is prepared.

Returns:

markAsReadOnly

public void markAsReadOnly()
Marks the context as read-only.


isReadOnly

public boolean isReadOnly()
Checks if the context is read-only.

Returns:
boolean

getMetaData

public Object getMetaData(Object key)
Returns meta-data for the transformation.

Parameters:
key - the key
Returns:
the value

addMetaData

public void addMetaData(Object key,
                        Object value)
Adds new meta-data for the transformation.

Parameters:
key - the key
value - the value

dump

public void dump(String dir)
Dump the class to specific directory.

Parameters:
dir -


Copyright © 2002-2004 Jonas Bonér, Alexandre Vasseur. All Rights Reserved.