org.objectweb.fractal.juliak.asm
Class InterceptorClassGenerator
java.lang.Object
org.objectweb.fractal.juliak.asm.AbstractClassGenerator
org.objectweb.fractal.juliak.asm.InterceptorClassGenerator
- All Implemented Interfaces:
- ClassGenerator
public class InterceptorClassGenerator
- extends AbstractClassGenerator
This class generates Interceptor
implementations.
- Since:
- 2.5
- Author:
- Lionel Seinturier
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InterceptorClassGenerator
public InterceptorClassGenerator(String desc)
throws TreeParserException
- Throws:
TreeParserException
getClassNameSuffix
protected String getClassNameSuffix(InterfaceType it)
- Return the name of the suffix which is appended to generated class names.
- Specified by:
getClassNameSuffix
in class AbstractClassGenerator
match
public boolean match(InterfaceType it)
- Return true if the mode (IN, OUT or IN_OUT) of at least one of the class
generators matchs the mode (client or server) of the given interface
type.
- Specified by:
match
in interface ClassGenerator
- Specified by:
match
in class AbstractClassGenerator
generate
public byte[] generate(String targetClassname,
InterfaceType it,
InitializationContext ic)
throws InstantiationException
- Generate the bytecode of an interceptor class implementing the given
Fractal interface type.
- Specified by:
generate
in interface ClassGenerator
- Specified by:
generate
in class AbstractClassGenerator
- Parameters:
targetClassname
- the name of the class to generateit
- the corresponding interface typeic
- the context for initializing the generated class
- Returns:
- the bytecode of the generated class or
null if the interceptor does not apply to the current
interface type
- Throws:
InstantiationException