|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Assistant
This is an interface for objects invoked by the Javassist preprocessor when the preprocessor encounters an annotated import declaration.
Compiler| Method Summary | |
|---|---|
CompileTimeClass[] |
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 |
|---|
CompileTimeClass[] assist(ClassPool cp,
java.lang.String importname,
java.lang.String[] args)
throws CannotCompileException
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) };
}
cp - class poolimportname - the class imported by the declarationargs - the parameters specified by the annotation
CannotCompileException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||