Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.aspectwerkz.transform.inlining
Class ContextImpl

    java.lang.Object
      org.codehaus.aspectwerkz.transform.inlining.ContextImpl

All Implemented Interfaces:
  Context

    public class ContextImpl

extends Object
implements Context

Implementation of the transformation context interface for the delegation weaving.

Author:
  Jonas Bonr , Alexandre Vasseur

Constructor Summary
`ContextImpl(String className, byte[] bytecode, ClassLoader loader)` Creates a new context.

Method Summary
`void` | `addEmittedJoinPoint(EmittedJoinPoint jp)` Adds a new EmittedJoinPoint
`void` | `addLineNumberInfo(org.objectweb.asm.Label label, int lineNumber)`
`void` | `addMetaData(Object key, Object value)` Adds new meta-data for the transformation.
`void` | `dump(String dumpDir)` Dumps the class to specific directory.
`String` | `getClassName()`
`byte[]` | `getCurrentBytecode()` Returns the current bytecode.
`Set` | `getDefinitions()` The definitions context (with hierarchical structure)
`List` | `getEmittedJoinPoints()` Returns all the EmittedJoinPoints
`byte[]` | `getInitialBytecode()` Returns the initial bytecode.
`ClassLoader` | `getLoader()` Returns the class loader.
`Object` | `getMetaData(Object key)` Returns meta-data for the transformation.
`long` | `getSerialVerUid()`
`boolean` | `isAdvised()` Checks if the class being transformed has beed advised.
`boolean` | `isMadeAdvisable()` Checks if the class has been made advisable.
`boolean` | `isReadOnly()` Checks if the context is read-only.
`void` | `markAsAdvised()` Marks the class being transformed as advised.
`void` | `markAsReadOnly()` Marks the context as read-only.
`void` | `markMadeAdvisable()` Marks the class as made advisable.
`void` | `resetAdvised()` Resets the isAdviced flag.
`int` | `resolveLineNumberInfo(org.objectweb.asm.Label label)` Tries to resolve the line number from the given label
`void` | `setCurrentBytecode(byte[] bytecode)` Sets the current bytecode.
`void` | `setSerialVerUid(long initialSerialVerUid)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ContextImpl

    public ContextImpl(String className,
                       byte[] bytecode,
                       ClassLoader loader)

  Creates a new context.

  Parameters:
    `loader` - the class loader

Method Detail

### getClassName

    public String getClassName()

  Specified by:
    `getClassName` in interface `Context`

### getInitialBytecode

    public byte[] getInitialBytecode()

  Returns the initial bytecode.

  Specified by:
    `getInitialBytecode` in interface `Context`
  Returns:
    bytecode

### getCurrentBytecode

    public byte[] getCurrentBytecode()

  Returns the current bytecode.

  Specified by:
    `getCurrentBytecode` in interface `Context`
  Returns:
    bytecode

### setCurrentBytecode

    public void setCurrentBytecode(byte[] bytecode)

  Sets the current bytecode.

  Specified by:
    `setCurrentBytecode` in interface `Context`
  Parameters:
    `bytecode` -

### getLoader

    public ClassLoader getLoader()

  Returns the class loader.

  Specified by:
    `getLoader` in interface `Context`
  Returns:
    the class loader

### getDefinitions

    public Set getDefinitions()

  The definitions context (with hierarchical structure)

  Specified by:
    `getDefinitions` in interface `Context`
  Returns:

### markAsAdvised

    public void markAsAdvised()

  Marks the class being transformed as advised. The marker can at most be set once per class per transformer

  Specified by:
    `markAsAdvised` in interface `Context`

### markMadeAdvisable

    public void markMadeAdvisable()

  Marks the class as made advisable.

### resetAdvised

    public void resetAdvised()

  Resets the isAdviced flag.

  Specified by:
    `resetAdvised` in interface `Context`

### isAdvised

    public boolean isAdvised()

  Checks if the class being transformed has beed advised.

  Specified by:
    `isAdvised` in interface `Context`
  Returns:
    boolean

### isMadeAdvisable

    public boolean isMadeAdvisable()

  Checks if the class has been made advisable.

  Returns:

### markAsReadOnly

    public void markAsReadOnly()

  Marks the context as read-only.

  Specified by:
    `markAsReadOnly` in interface `Context`

### isReadOnly

    public boolean isReadOnly()

  Checks if the context is read-only.

  Specified by:
    `isReadOnly` in interface `Context`
  Returns:
    boolean

### getMetaData

    public Object getMetaData(Object key)

  Returns meta-data for the transformation.

  Specified by:
    `getMetaData` in interface `Context`
  Parameters:
    `key` - the key
  Returns:
    the value

### addMetaData

    public void addMetaData(Object key,
                            Object value)

  Adds new meta-data for the transformation.

  Specified by:
    `addMetaData` in interface `Context`
  Parameters:
    `key` - the key
    `value` - the value

### dump

    public void dump(String dumpDir)

  Dumps the class to specific directory.

  Specified by:
    `dump` in interface `Context`
  Parameters:
    `dumpDir` -

### addEmittedJoinPoint

    public void addEmittedJoinPoint(EmittedJoinPoint jp)

  Adds a new EmittedJoinPoint

  Parameters:
    `jp` -

### getEmittedJoinPoints

    public List getEmittedJoinPoints()

  Returns all the EmittedJoinPoints

  Returns:

### setSerialVerUid

    public void setSerialVerUid(long initialSerialVerUid)

### getSerialVerUid

    public long getSerialVerUid()

### addLineNumberInfo

    public void addLineNumberInfo(org.objectweb.asm.Label label,
                                  int lineNumber)

### resolveLineNumberInfo

    public int resolveLineNumberInfo(org.objectweb.asm.Label label)

  Tries to resolve the line number from the given label

  Specified by:
    `resolveLineNumberInfo` in interface `Context`
  Parameters:
    `label` -
  Returns:

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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