Package javassist
Class CtNewClass
java.lang.Object
javassist.CtClass
javassist.CtClassType
javassist.CtNewClass
-
Nested Class Summary
Nested classes/interfaces inherited from class javassist.CtClass
CtClass.DelayedFileOutputStream -
Field Summary
FieldsFields inherited from class javassist.CtClassType
classfile, classPool, gcConstPool, rawClassfile, wasChanged, wasPrunedFields inherited from class javassist.CtClass
booleanType, byteType, charType, debugDump, doubleType, floatType, intType, javaLangObject, longType, primitiveTypes, qualifiedName, shortType, version, voidType -
Constructor Summary
ConstructorsConstructorDescriptionCtNewClass(String name, ClassPool cp, boolean isInterface, CtClass superclass) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a constructor.protected voidextendToString(StringBuilder buffer) Implemented in subclasses to add to theCtClass.toString()result.voidAdds constructors inhrited from the super class.private booleanisInheritable(int mod, CtClass superclazz) voidConverts this class to a class file.Methods inherited from class javassist.CtClassType
addField, addField, addInterface, addMethod, checkModify, compress, defrost, freeze, getAccessorMaker, getAnnotation, getAnnotations, getAnnotationType, getAttribute, getAvailableAnnotations, getClassFile2, getClassFile3, getClassInitializer, getClassPool, getConstructor, getConstructors, getDeclaredBehaviors, getDeclaredConstructors, getDeclaredField, getDeclaredField, getDeclaredFields, getDeclaredMethod, getDeclaredMethod, getDeclaredMethods, getDeclaredMethods, getDeclaringClass, getEnclosingBehavior, getField, getField2, getFields, getGenericSignature, getHiddenMethods, getInterfaces, getMembers, getMethod, getMethods, getModifiers, getNestedClasses, getSuperclass, getUniqueNumber, getURL, hasAnnotation, hasAnnotationType, hasAnnotationType, hasMemberCache, incGetCounter, instrument, instrument, isAnnotation, isEnum, isFrozen, isInterface, isModified, makeClassInitializer, makeNestedClass, makeUniqueName, prune, rebuildClassFile, removeConstructor, removeField, removeMethod, replaceClassName, replaceClassName, setAttribute, setClassPool, setGenericSignature, setInterfaces, setModifiers, setName, setSuperclass, stopPruning, subclassOf, subtypeOf, toAnnotationType, toAnnotationTypeMethods inherited from class javassist.CtClass
addField, debugWriteFile, debugWriteFile, detach, getClassFile, getComponentType, getDeclaredClasses, getDeclaredConstructor, getEnclosingMethod, getField, getName, getPackageName, getRefClasses, getSimpleName, hasAnnotation, isArray, isKotlin, isPrimitive, main, makeFileOutput, toBytecode, toClass, toClass, toClass, toClass, toClass, toString, writeFile, writeFile
-
Field Details
-
hasConstructor
protected boolean hasConstructor
-
-
Constructor Details
-
CtNewClass
-
-
Method Details
-
extendToString
Description copied from class:CtClassImplemented in subclasses to add to theCtClass.toString()result. Subclasses should put a space before each token added to the buffer.- Overrides:
extendToStringin classCtClassType
-
addConstructor
Description copied from class:CtClassAdds a constructor. To add a class initializer (static constructor), callmakeClassInitializer().- Overrides:
addConstructorin classCtClassType- Throws:
CannotCompileException- See Also:
-
toBytecode
Description copied from class:CtClassConverts this class to a class file. Once this method is called, further modifications are not possible any more.This method dose not close the output stream in the end.
- Overrides:
toBytecodein classCtClassType- Parameters:
out- the output stream that a class file is written to.- Throws:
CannotCompileExceptionIOException
-
inheritAllConstructors
Adds constructors inhrited from the super class.After this method is called, the class inherits all the constructors from the super class. The added constructor calls the super's constructor with the same signature.
-
isInheritable
-