Package javassist
Class CtArray
- java.lang.Object
-
- javassist.CtClass
-
- javassist.CtArray
-
final class CtArray extends CtClass
Array types.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javassist.CtClass
CtClass.DelayedFileOutputStream
-
-
Field Summary
Fields Modifier and Type Field Description private CtClass[]interfacesprotected ClassPoolpool-
Fields inherited from class javassist.CtClass
booleanType, byteType, charType, debugDump, doubleType, floatType, intType, javaLangObject, longType, primitiveTypes, qualifiedName, shortType, version, voidType
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassPoolgetClassPool()Returns aClassPoolfor this class.CtClassgetComponentType()If this object represents an array, this method returns the component type of the array.CtConstructor[]getConstructors()Returns an array containingCtConstructorobjects representing all the non-private constructors of the class.CtClass[]getInterfaces()Obtains the class objects representing the interfaces implemented by the class or, if this object represents an interface, the interfaces extended by that interface.CtMethodgetMethod(java.lang.String name, java.lang.String desc)Returns the method with the given name and signature.CtMethod[]getMethods()Returns an array containingCtMethodobjects representing all the non-private methods of the class.intgetModifiers()Returns the modifiers for this class, encoded in an integer.CtClassgetSuperclass()Obtains the class object representing the superclass of the class.booleanisArray()Returnstrueif this object represents an array type.booleansubtypeOf(CtClass clazz)Returnstrueif this class extends or implementsclazz.-
Methods inherited from class javassist.CtClass
addConstructor, addField, addField, addField, addInterface, addMethod, checkModify, compress, debugWriteFile, debugWriteFile, defrost, detach, extendToString, freeze, getAccessorMaker, getAnnotation, getAnnotations, getAttribute, getAvailableAnnotations, getClassFile, getClassFile2, getClassInitializer, getConstructor, getDeclaredBehaviors, getDeclaredClasses, getDeclaredConstructor, getDeclaredConstructors, getDeclaredField, getDeclaredField, getDeclaredFields, getDeclaredMethod, getDeclaredMethod, getDeclaredMethods, getDeclaredMethods, getDeclaringClass, getEnclosingBehavior, getEnclosingMethod, getField, getField, getField2, getFields, getGenericSignature, getName, getNestedClasses, getPackageName, getRefClasses, getSimpleName, getURL, hasAnnotation, hasAnnotation, incGetCounter, instrument, instrument, isAnnotation, isEnum, isFrozen, isInterface, isKotlin, isModified, isPrimitive, main, makeClassInitializer, makeFileOutput, makeNestedClass, makeUniqueName, prune, rebuildClassFile, removeConstructor, removeField, removeMethod, replaceClassName, replaceClassName, setAttribute, setGenericSignature, setInterfaces, setModifiers, setName, setSuperclass, stopPruning, subclassOf, toBytecode, toBytecode, toClass, toClass, toClass, toClass, toClass, toString, writeFile, writeFile
-
-
-
-
Constructor Detail
-
CtArray
CtArray(java.lang.String name, ClassPool cp)
-
-
Method Detail
-
getClassPool
public ClassPool getClassPool()
Description copied from class:CtClassReturns aClassPoolfor this class.- Overrides:
getClassPoolin classCtClass
-
isArray
public boolean isArray()
Description copied from class:CtClassReturnstrueif this object represents an array type.
-
getModifiers
public int getModifiers()
Description copied from class:CtClassReturns the modifiers for this class, encoded in an integer. For decoding, usejavassist.Modifier.If the class is a static nested class (a.k.a. static inner class), the returned modifiers include
Modifier.STATIC.- Overrides:
getModifiersin classCtClass- See Also:
Modifier
-
getInterfaces
public CtClass[] getInterfaces() throws NotFoundException
Description copied from class:CtClassObtains the class objects representing the interfaces implemented by the class or, if this object represents an interface, the interfaces extended by that interface.- Overrides:
getInterfacesin classCtClass- Throws:
NotFoundException
-
subtypeOf
public boolean subtypeOf(CtClass clazz) throws NotFoundException
Description copied from class:CtClassReturnstrueif this class extends or implementsclazz. It also returnstrueif this class is the same asclazz.- Overrides:
subtypeOfin classCtClass- Throws:
NotFoundException
-
getComponentType
public CtClass getComponentType() throws NotFoundException
Description copied from class:CtClassIf this object represents an array, this method returns the component type of the array. Otherwise, it returnsnull.- Overrides:
getComponentTypein classCtClass- Throws:
NotFoundException
-
getSuperclass
public CtClass getSuperclass() throws NotFoundException
Description copied from class:CtClassObtains the class object representing the superclass of the class. It returns null if this object represents thejava.lang.Objectclass and thus it does not have the super class.If this object represents an interface, this method always returns the
java.lang.Objectclass. To obtain the super interfaces extended by that interface, callgetInterfaces().- Overrides:
getSuperclassin classCtClass- Throws:
NotFoundException
-
getMethods
public CtMethod[] getMethods()
Description copied from class:CtClassReturns an array containingCtMethodobjects representing all the non-private methods of the class. That array includes non-private methods inherited from the superclasses.- Overrides:
getMethodsin classCtClass
-
getMethod
public CtMethod getMethod(java.lang.String name, java.lang.String desc) throws NotFoundException
Description copied from class:CtClassReturns the method with the given name and signature. The returned method may be declared in a super class. The method signature is represented by a character string called method descriptor, which is defined in the JVM specification.- Overrides:
getMethodin classCtClass- Parameters:
name- method namedesc- method descriptor- Throws:
NotFoundException- See Also:
CtBehavior.getSignature(),Descriptor
-
getConstructors
public CtConstructor[] getConstructors()
Description copied from class:CtClassReturns an array containingCtConstructorobjects representing all the non-private constructors of the class.- Overrides:
getConstructorsin classCtClass
-
-