javassist.preproc
Interface Assistant


public interface Assistant

This is an interface for objects invoked by the Javassist preprocessor when the preprocessor encounters an annotated import declaration.

See Also:
Compiler

Method Summary
 CtClass[] assist(ClassPool cp, java.lang.String importname, java.lang.String[] args)
          Is called when the Javassist preprocessor encounters an import declaration annotated with the "by" keyword.
 

Method Detail

assist

public CtClass[] assist(ClassPool cp,
                        java.lang.String importname,
                        java.lang.String[] args)
                 throws CannotCompileException
Is called when the Javassist preprocessor encounters an import declaration annotated with the "by" keyword.

The original import declaration is replaced with new import declarations of classes returned by this method. For example, the following implementation does not change the original declaration:

Parameters:
cp - class pool
importname - the class imported by the declaration
args - the parameters specified by the annotation
Returns:
the classes imported in the java source program produced by the preprocessor.
Throws:
CannotCompileException


Javassist, a Java-bytecode translator toolkit. Copyright (C) 1999-2003 Shigeru Chiba. All Rights Reserved.