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

## 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:

       public CtClass[] assist(ClassPool cp, String importname, String[] args) {
           return new CtClass[] { cp.get(importname) };
       }

  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.
    `CannotCompileException`

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

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