Search in sources :

Example 11 with InitMethod

use of com.googlecode.gwt.test.patchers.InitMethod in project gwt-test-utils by gwt-test-utils.

the class PrefixTreePatcher method initClass.

@InitMethod
static void initClass(CtClass c) throws CannotCompileException {
    // add field "private Set<?> PREFIXES_SET;"
    CtClass pcType = GwtClassPool.getCtClass(Set.class);
    CtField field = new CtField(pcType, PREFIXES_SET_PROPERTY, c);
    field.setModifiers(Modifier.PRIVATE);
    c.addField(field);
}
Also used : CtClass(javassist.CtClass) CtField(javassist.CtField) InitMethod(com.googlecode.gwt.test.patchers.InitMethod)

Aggregations

InitMethod (com.googlecode.gwt.test.patchers.InitMethod)11 CtMethod (javassist.CtMethod)7 GwtTestPatchException (com.googlecode.gwt.test.exceptions.GwtTestPatchException)2 CtClass (javassist.CtClass)2 CtConstructor (javassist.CtConstructor)2 CtField (javassist.CtField)2 NotFoundException (javassist.NotFoundException)2 GwtTestGWTBridge (com.googlecode.gwt.test.internal.handlers.GwtTestGWTBridge)1 RadioButtonManager (com.googlecode.gwt.test.internal.utils.RadioButtonManager)1 PatchMethod (com.googlecode.gwt.test.patchers.PatchMethod)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 Method (java.lang.reflect.Method)1