Uses of Class
javassist.CannotCompileException
Packages that use CannotCompileException
Package
Description
The Javassist Core API.
Bytecode-level API.
This package contains the classes for modifying a method body.
A custom class pool for several JBoss products.
Covenient tools.
Runtime Behavioral Reflection.
Sample implementation of remote method invocation.
Simple web server for running sample code.
Utility classes.
Dynamic proxy (similar to
Enhancer of cglib).-
Uses of CannotCompileException in javassist
Methods in javassist that throw CannotCompileExceptionModifier and TypeMethodDescriptionprivate static StringCtNewWrappedMethod.addBodyMethod(CtClassType clazz, ClassFile classfile, CtMethod src) voidAdds a catch clause that handles an exception thrown in the body.voidAdds a catch clause that handles an exception thrown in the body.voidCtClass.addConstructor(CtConstructor c) Adds a constructor.voidCtClassType.addConstructor(CtConstructor c) voidCtNewClass.addConstructor(CtConstructor c) voidAdds a field.voidAdds a field with an initial value.voidCtClass.addField(CtField f, CtField.Initializer init) Adds a field with an initial value.voidvoidCtClassType.addField(CtField f, CtField.Initializer init) voidCtBehavior.addLocalVariable(String name, CtClass type) Declares a new local variable.voidAdds a method.voidvoidCtBehavior.addParameter(CtClass type) Appends a new parameter, which becomes the last parameter.voidLoader.addTranslator(ClassPool cp, Translator t) Adds a translator, which is called whenever a class is loaded.static longSerialVersionUID.calculateDefault(CtClass clazz) Calculate default value.booleanCtConstructor.callsSuper()Returns true if this constructor calls a constructor of the super class.(package private) void(package private) void(package private) void(package private) void(package private) void(package private) voidprivate static voidCtNewWrappedMethod.checkSignature(CtMethod wrappedBody, String descriptor) (package private) intCtField.ArrayInitializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) intCtField.CodeInitializer0.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) intCtField.DoubleInitializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) intCtField.FloatInitializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) abstract intCtField.Initializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) intCtField.IntInitializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) intCtField.LongInitializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) intCtField.MethodInitializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) Produces codes in which a new object is created and assigned to the field as the initial value.(package private) intCtField.MultiArrayInitializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) intCtField.NewInitializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) Produces codes in which a new object is created and assigned to the field as the initial value.(package private) intCtField.ParamInitializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) intCtField.StringInitializer.compile(CtClass type, String name, Bytecode code, CtClass[] parameters, Javac drv) (package private) int(package private) int(package private) int(package private) int(package private) intCtField.ArrayInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) (package private) intCtField.CodeInitializer0.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) (package private) intCtField.DoubleInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) (package private) intCtField.FloatInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) (package private) abstract intCtField.Initializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) (package private) intCtField.IntInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) (package private) intCtField.LongInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) (package private) intCtField.MethodInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) Produces codes for a static field.(package private) intCtField.MultiArrayInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) (package private) intCtField.NewInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) Produces codes for a static field.(package private) intCtField.ParamInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) (package private) intCtField.StringInitializer.compileIfStatic(CtClass type, String name, Bytecode code, Javac drv) protected final intCtField.NewInitializer.compileStringParameter(Bytecode code) (package private) voidCtBehavior.copy(CtBehavior src, boolean isCons, ClassMap map) static CtConstructorCtNewConstructor.copy(CtConstructor c, CtClass declaring, ClassMap map) Creates a copy of a constructor.static CtMethodCreates a copy of a method with a new name.static CtMethodCreates a copy of a method.static CtConstructorCtNewConstructor.defaultConstructor(CtClass declaring) Creates a default (public) constructor.static CtMethodCreates a method forwarding to a delegate in a super class.private static CtMethodCtNewMethod.delegator0(CtMethod delegate, CtClass declaring) protected voidCodeConverter.doit(CtClass clazz, MethodInfo minfo, ConstPool cp) Performs code conversion.(package private) intCtBehavior.getStartPosOfBody(CodeAttribute ca) (package private) intCtConstructor.getStartPosOfBody(CodeAttribute ca) static CtMethodCreates a public getter method.voidCtNewClass.inheritAllConstructors()Adds constructors inhrited from the super class.voidCtBehavior.insertAfter(String src) Inserts bytecode at the end of the body.voidCtBehavior.insertAfter(String src, boolean asFinally) Inserts bytecode at the end of the body.voidCtBehavior.insertAfter(String src, boolean asFinally, boolean redundant) Inserts bytecode at the end of the body.voidCodeConverter.insertAfterMethod(CtMethod origMethod, CtMethod afterMethod) Inserts a call to another method after an existing method call.intInserts bytecode at the specified line in the body.intInserts bytecode at the specified line in the body.voidCtBehavior.insertBefore(String src) Inserts bytecode at the beginning of the body.private voidCtBehavior.insertBefore(String src, boolean rebuild) voidCtConstructor.insertBeforeBody(String src) Inserts bytecode just after another constructor in the super class or this class is called.voidCodeConverter.insertBeforeMethod(CtMethod origMethod, CtMethod beforeMethod) Insert a call to another method before an existing method call.voidCtBehavior.insertParameter(CtClass type) Inserts a new parameter, which becomes the first parameter.voidCtBehavior.instrument(CodeConverter converter) Modifies the method/constructor body.voidCtBehavior.instrument(ExprEditor editor) Modifies the method/constructor body.voidCtClass.instrument(CodeConverter converter) Applies the given converter to all methods and constructors declared in the class.voidCtClass.instrument(ExprEditor editor) Modifies the bodies of all methods and constructors declared in the class.voidCtClassType.instrument(CodeConverter converter) voidCtClassType.instrument(ExprEditor editor) Class<?>Loader.Simple.invokeDefineClass(CtClass cc) Invokes the protecteddefineClass()inClassLoader.static CtFieldCompiles the given source code and creates a field.static CtMethodCompiles the given source code and creates a method.static CtMethodCtMethod.make(MethodInfo minfo, CtClass declaring) Creates a method from aMethodInfoobject.static CtConstructorCompiles the given source code and creates a constructor.static CtConstructorCtNewConstructor.make(CtClass[] parameters, CtClass[] exceptions, int howto, CtMethod body, CtMethod.ConstParameter cparam, CtClass declaring) Creates a public constructor.static CtConstructorCreates a public constructor.static CtConstructorCreates a public constructor that only calls a constructor in the super class.static CtMethodCtNewMethod.make(int modifiers, CtClass returnType, String mname, CtClass[] parameters, CtClass[] exceptions, String body, CtClass declaring) Creates a method.static CtMethodCompiles the given source code and creates a method.static CtMethodCompiles the given source code and creates a method.static CtMethodCtNewMethod.make(CtClass returnType, String mname, CtClass[] parameters, CtClass[] exceptions, String body, CtClass declaring) Creates a public (non-static) method.protected static BytecodeCtNewWrappedConstructor.makeBody(CtClass declaring, ClassFile classfile, int howToCallSuper, CtMethod wrappedBody, CtClass[] parameters, CtMethod.ConstParameter cparam) (package private) static BytecodeCtNewWrappedMethod.makeBody(CtClass clazz, ClassFile classfile, CtMethod wrappedBody, CtClass[] parameters, CtClass returnType, CtMethod.ConstParameter cparam) protected static intCtNewWrappedMethod.makeBody0(CtClass clazz, ClassFile classfile, CtMethod wrappedBody, boolean isStatic, CtClass[] parameters, CtClass returnType, CtMethod.ConstParameter cparam, Bytecode code) CtClass.makeClassInitializer()Makes an empty class initializer (static constructor).CtClassType.makeClassInitializer()private intCtClassType.makeFieldInitializer(Bytecode code, CtClass[] parameters) voidClassPool.makePackage(ClassLoader loader, String name) Deprecated.private voidCtClassType.modifyClassConstructor(ClassFile cf) private voidCtClassType.modifyClassConstructor(ClassFile cf, Bytecode code, int stacksize, int localsize) private voidCtClassType.modifyConstructors(ClassFile cf) voidIs invoked by aLoaderfor notifying that a class is loaded.voidCodeConverter.redirectMethodCall(String oldMethodName, CtMethod newMethod) Correct invocations to a method that has been renamed.voidCodeConverter.redirectMethodCall(CtMethod origMethod, CtMethod substMethod) Modify method invocations in a method body so that a different method will be invoked.private static voidCtConstructor.removeConsCall(CodeAttribute ca) voidSets a method/constructor body.voidSets a method/constructor body.voidSets a constructor body.voidCtConstructor.setBody(CtConstructor src, ClassMap map) Copies a constructor body from another constructor.voidCopies a method body from another method.(package private) static voidCtBehavior.setBody0(CtClass srcClass, MethodInfo srcInfo, CtClass destClass, MethodInfo destInfo, ClassMap map) static voidSerialVersionUID.setSerialVersionUID(CtClass clazz) Adds serialVersionUID if one does not already exist.voidCtClass.setSuperclass(CtClass clazz) Changes a super class unless this object represents an interface.voidCtClassType.setSuperclass(CtClass clazz) static CtMethodCreates a public setter method.voidCtMethod.setWrappedBody(CtMethod mbody, CtMethod.ConstParameter constParam) Replace a method body with a new method body wrapping the given method.static CtConstructorCreates a public constructor that only calls a constructor in the super class.voidIs invoked by aLoaderfor initialization when the object is attached to theLoaderobject.byte[]CtClass.toBytecode()Converts this class to a class file.voidCtClass.toBytecode(DataOutputStream out) Converts this class to a class file.voidCtClassType.toBytecode(DataOutputStream out) voidCtNewClass.toBytecode(DataOutputStream out) Converts the given class to ajava.lang.Classobject.Class<?>Converts the class to ajava.lang.Classobject.ClassPool.toClass(CtClass ct, Class<?> neighbor, ClassLoader loader, ProtectionDomain domain) Converts the class to ajava.lang.Classobject.ClassPool.toClass(CtClass ct, ClassLoader loader) Deprecated.ClassPool.toClass(CtClass ct, ClassLoader loader, ProtectionDomain domain) Deprecated.Class<?>ClassPool.toClass(CtClass ct, MethodHandles.Lookup lookup) Converts the class to ajava.lang.Classobject.Class<?>CtClass.toClass()Converts this class to ajava.lang.Classobject.Class<?>Converts this class to ajava.lang.Classobject.final Class<?>CtClass.toClass(ClassLoader loader) Deprecated.Replaced byCtClass.toClass(ClassLoader,ProtectionDomain)Class<?>CtClass.toClass(ClassLoader loader, ProtectionDomain domain) Converts this class to ajava.lang.Classobject.Class<?>CtClass.toClass(MethodHandles.Lookup lookup) Converts this class to ajava.lang.Classobject.Makes a copy of this constructor and converts it into a method.Makes a copy of this constructor and converts it into a method.voidDeclares to use$cflowfor this method/constructor.static CtMethodCtNewMethod.wrapped(CtClass returnType, String mname, CtClass[] parameterTypes, CtClass[] exceptionTypes, CtMethod body, CtMethod.ConstParameter constParam, CtClass declaring) Creates a wrapped method.static CtConstructorCtNewWrappedConstructor.wrapped(CtClass[] parameterTypes, CtClass[] exceptionTypes, int howToCallSuper, CtMethod body, CtMethod.ConstParameter constParam, CtClass declaring) static CtMethodCtNewWrappedMethod.wrapped(CtClass returnType, String mname, CtClass[] parameterTypes, CtClass[] exceptionTypes, CtMethod body, CtMethod.ConstParameter constParam, CtClass declaring) (package private) voidClassPool.writeClassfile(String classname, OutputStream out) (package private) voidClassPoolTail.writeClassfile(String classname, OutputStream out) This method does not close the output stream.voidCtClass.writeFile()Writes a class file represented by thisCtClassobject in the current directory.voidWrites a class file represented by thisCtClassobject on a local disk.Constructors in javassist that throw CannotCompileExceptionModifierConstructorDescriptionCtConstructor(CtConstructor src, CtClass declaring, ClassMap map) Creates a copy of aCtConstructorobject.privateCreates aCtFieldobject.Creates a copy of the given field.Creates a copy of aCtMethodobject. -
Uses of CannotCompileException in javassist.bytecode
Subclasses of CannotCompileException in javassist.bytecodeModifier and TypeClassDescriptionclassAn exception thrown when adding a duplicate member is requested.Methods in javassist.bytecode that throw CannotCompileExceptionModifier and TypeMethodDescriptionvoidStackMap.removeNew(int where) Undocumented method.voidStackMapTable.removeNew(int where) Undocumented method.voidClassFile.setSuperclass(String superclass) Sets the super class. -
Uses of CannotCompileException in javassist.compiler
Methods in javassist.compiler that throw CannotCompileExceptionConstructors in javassist.compiler with parameters of type CannotCompileExceptionConstructors in javassist.compiler that throw CannotCompileExceptionModifierConstructorDescription(package private)CtFieldWithInit(CtClass type, String name, CtClass declaring) -
Uses of CannotCompileException in javassist.convert
Methods in javassist.convert that throw CannotCompileExceptionModifier and TypeMethodDescriptionvoidTransformAccessArrayField.initialize(ConstPool cp, CtClass clazz, MethodInfo minfo) voidTransformer.initialize(ConstPool cp, CtClass clazz, MethodInfo minfo) abstract intTransformer.transform(CtClass clazz, int pos, CodeIterator it, ConstPool cp) intTransformNew.transform(CtClass clazz, int pos, CodeIterator iterator, ConstPool cp) Replace a sequence of NEW classname DUP ...intTransformNewClass.transform(CtClass clazz, int pos, CodeIterator iterator, ConstPool cp) Modifies a sequence of NEW classname DUP ... -
Uses of CannotCompileException in javassist.expr
Methods in javassist.expr that throw CannotCompileExceptionModifier and TypeMethodDescriptionprivate intNewExpr.canReplace()(package private) static final booleanExpr.checkResultValue(CtClass retType, String prog) booleanExprEditor.doit(CtClass clazz, MethodInfo minfo) Undocumented method.(package private) booleanExprEditor.doit(CtClass clazz, MethodInfo minfo, ExprEditor.LoopContext context, CodeIterator iterator, int endPos) Visits each bytecode in the given range.voidEdits an expression for explicit type casting (overridable).voidExprEditor.edit(ConstructorCall c) Edits a constructor call (overridable).voidExprEditor.edit(FieldAccess f) Edits a field-access expression (overridable).voidEdits a catch clause (overridable).voidExprEditor.edit(Instanceof i) Edits an instanceof expression (overridable).voidExprEditor.edit(MethodCall m) Edits a method call (overridable).voidEdits an expression for array creation (overridable).voidEdits anewexpression (overridable).voidHandler.insertBefore(String src) Inserts bytecode at the beginning of the catch clause.(package private) final booleanExprEditor.loopBody(CodeIterator iterator, CtClass clazz, MethodInfo minfo, ExprEditor.LoopContext context) voidReplaces the explicit cast operator with the bytecode derived from the given source text.abstract voidReplaces this expression with the bytecode derived from the given source text.voidExpr.replace(String statement, ExprEditor recursive) Replaces this expression with the bytecode derived from the given source text andExprEditor.voidReplaces the method call with the bytecode derived from the given source text.voidThis method has not been implemented yet.voidReplaces the instanceof operator with the bytecode derived from the given source text.voidReplaces the method call with the bytecode derived from the given source text.voidReplaces the array creation with the bytecode derived from the given source text.voidReplaces thenewexpression with the bytecode derived from the given source text.private voidprotected voidExpr.runEditor(ExprEditor ed, CodeIterator oldIterator) -
Uses of CannotCompileException in javassist.scopedpool
Methods in javassist.scopedpool that throw CannotCompileExceptionModifier and TypeMethodDescriptionClass<?>ScopedClassPool.toClass(CtClass ct, ClassLoader loader, ProtectionDomain domain) Convert a javassist class to a java class -
Uses of CannotCompileException in javassist.tools
Methods in javassist.tools that throw CannotCompileExceptionModifier and TypeMethodDescriptionstatic voidCallback.insertAfter(CtBehavior behavior, Callback callback) Utility method to inserts callback at the end of the body.static voidCallback.insertAfter(CtBehavior behavior, Callback callback, boolean asFinally) Utility method to inserts callback at the end of the body.static intCallback.insertAt(CtBehavior behavior, Callback callback, int lineNum) Utility method to inserts callback at the specified line in the body.static voidCallback.insertBefore(CtBehavior behavior, Callback callback) Utility method to insert callback at the beginning of the body. -
Uses of CannotCompileException in javassist.tools.reflect
Subclasses of CannotCompileException in javassist.tools.reflectModifier and TypeClassDescriptionclassThrown bymakeReflective()inReflectionwhen there is an attempt to reflect a class that is either an interface or a subclass of either ClassMetaobject or Metaobject.Methods in javassist.tools.reflect that throw CannotCompileExceptionModifier and TypeMethodDescriptionbooleanLoader.makeReflective(String clazz, String metaobject, String metaclass) Produces a reflective class.booleanReflection.makeReflective(Class<?> clazz, Class<?> metaobject, Class<?> metaclass) Produces a reflective class.booleanReflection.makeReflective(String classname, String metaobject, String metaclass) Produces a reflective class.booleanReflection.makeReflective(CtClass clazz, CtClass metaobject, CtClass metaclass) Produces a reflective class.private booleanReflection.modifyClassfile(CtClass clazz, CtClass metaobject, CtClass metaclass) voidInserts hooks for intercepting accesses to the fields declared in reflective classes.private voidReflection.processFields(CtClass clazz) private voidReflection.processMethods(CtClass clazz, boolean dontSearch) private voidReflection.processMethods0(int mod, CtClass clazz, CtMethod m, int identifier, boolean dontSearch) Constructors in javassist.tools.reflect that throw CannotCompileException -
Uses of CannotCompileException in javassist.tools.rmi
Methods in javassist.tools.rmi that throw CannotCompileExceptionModifier and TypeMethodDescriptionprivate voidStubGenerator.addMethods(CtClass proxy, Method[] ms) private ObjectAppletServer.convertRvalue(Object rvalue) intAppletServer.exportObject(String name, Object obj) Exports an object.booleanStubGenerator.makeProxyClass(Class<?> clazz) Makes a proxy class.private voidStubGenerator.modifySuperclass(CtClass orgclass) Adds a default constructor to the super classes.private CtClassStubGenerator.produceProxyClass(CtClass orgclass, Class<?> orgRtClass) Constructors in javassist.tools.rmi that throw CannotCompileExceptionModifierConstructorDescriptionAppletServer(int port) Constructs a web server.AppletServer(int port, ClassPool src) Constructs a web server.AppletServer(String port) Constructs a web server.privateAppletServer(ClassPool loader, StubGenerator gen, int port) -
Uses of CannotCompileException in javassist.tools.web
Methods in javassist.tools.web that throw CannotCompileExceptionModifier and TypeMethodDescriptionvoidWebserver.addTranslator(ClassPool cp, Translator t) Adds a translator, which is called whenever a client requests a class file. -
Uses of CannotCompileException in javassist.util
Methods in javassist.util that throw CannotCompileExceptionModifier and TypeMethodDescriptionstatic FileHotSwapAgent.createAgentJarFile(String fileName) Creates an agent file for usingHotSwapAgent.private static FileHotSwapAgent.createJarFile()private static FileHotSwapAgent.createJarFile(File jar) static voidRedefines classes.static voidRedefines a class. -
Uses of CannotCompileException in javassist.util.proxy
Methods in javassist.util.proxy that throw CannotCompileExceptionModifier and TypeMethodDescriptionprivate static voidProxyFactory.addClassInitializer(ClassFile cf, ConstPool cp, String classname, int size, List<ProxyFactory.Find2MethodsArgs> forwarders) private static voidprivate static void(package private) abstract Class<?>DefineClassHelper.Helper.defineClass(String name, byte[] b, int off, int len, Class<?> neighbor, ClassLoader loader, ProtectionDomain protectionDomain) (package private) Class<?>DefineClassHelper.Java11.defineClass(String name, byte[] bcode, int off, int len, Class<?> neighbor, ClassLoader loader, ProtectionDomain protectionDomain) (package private) Class<?>DefineClassHelper.JavaOther.defineClass(String name, byte[] b, int off, int len, Class<?> neighbor, ClassLoader loader, ProtectionDomain protectionDomain) static voidDefinePackageHelper.definePackage(String className, ClassLoader loader) Defines a new package.private ClassFileProxyFactory.make()private voidProxyFactory.makeConstructors(String thisClassName, ClassFile cf, ConstPool cp, String classname) private voidProxyFactory.override(String thisClassname, Method meth, String prefix, int index, String desc, ClassFile cf, ConstPool cp, List<ProxyFactory.Find2MethodsArgs> forwarders) private intProxyFactory.overrideMethods(ClassFile cf, ConstPool cp, String className, List<ProxyFactory.Find2MethodsArgs> forwarders) static Class<?>Loads a class file byjava.lang.invoke.MethodHandles.Lookup.static Class<?>DefineClassHelper.toClass(MethodHandles.Lookup lookup, byte[] bcode) Loads a class file byjava.lang.invoke.MethodHandles.Lookup.static Class<?>DefineClassHelper.toClass(String className, Class<?> neighbor, ClassLoader loader, ProtectionDomain domain, byte[] bcode) Loads a class file by a given class loader.static Class<?>FactoryHelper.toClass(ClassFile cf, Class<?> neighbor, ClassLoader loader, ProtectionDomain domain) Loads a class file by a given class loader.static Class<?>FactoryHelper.toClass(ClassFile cf, ClassLoader loader) Deprecated.static Class<?>FactoryHelper.toClass(ClassFile cf, ClassLoader loader, ProtectionDomain domain) Deprecated.static Class<?>FactoryHelper.toClass(ClassFile cf, MethodHandles.Lookup lookup) Loads a class file by a given lookup.(package private) static Class<?>DefineClassHelper.toPublicClass(String className, byte[] bcode) Loads a class file byjava.lang.invoke.MethodHandles.Lookup.static voidWrites a class file.private static voidFactoryHelper.writeFile0(ClassFile cf, String directoryName)
ClassPool.toClass(CtClass,Class,ClassLoader,ProtectionDomain).