Package javassist

Class CtArray


  • final class CtArray
    extends CtClass
    Array types.
    • Constructor Detail

      • CtArray

        CtArray​(java.lang.String name,
                ClassPool cp)
    • Method Detail

      • isArray

        public boolean isArray()
        Description copied from class: CtClass
        Returns true if this object represents an array type.
        Overrides:
        isArray in class CtClass
      • getModifiers

        public int getModifiers()
        Description copied from class: CtClass
        Returns the modifiers for this class, encoded in an integer. For decoding, use javassist.Modifier.

        If the class is a static nested class (a.k.a. static inner class), the returned modifiers include Modifier.STATIC.

        Overrides:
        getModifiers in class CtClass
        See Also:
        Modifier
      • getInterfaces

        public CtClass[] getInterfaces()
                                throws NotFoundException
        Description copied from class: CtClass
        Obtains the class objects representing the interfaces implemented by the class or, if this object represents an interface, the interfaces extended by that interface.
        Overrides:
        getInterfaces in class CtClass
        Throws:
        NotFoundException
      • getSuperclass

        public CtClass getSuperclass()
                              throws NotFoundException
        Description copied from class: CtClass
        Obtains the class object representing the superclass of the class. It returns null if this object represents the java.lang.Object class and thus it does not have the super class.

        If this object represents an interface, this method always returns the java.lang.Object class. To obtain the super interfaces extended by that interface, call getInterfaces().

        Overrides:
        getSuperclass in class CtClass
        Throws:
        NotFoundException
      • getMethods

        public CtMethod[] getMethods()
        Description copied from class: CtClass
        Returns an array containing CtMethod objects representing all the non-private methods of the class. That array includes non-private methods inherited from the superclasses.
        Overrides:
        getMethods in class CtClass
      • getMethod

        public CtMethod getMethod​(java.lang.String name,
                                  java.lang.String desc)
                           throws NotFoundException
        Description copied from class: CtClass
        Returns 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:
        getMethod in class CtClass
        Parameters:
        name - method name
        desc - method descriptor
        Throws:
        NotFoundException
        See Also:
        CtBehavior.getSignature(), Descriptor
      • getConstructors

        public CtConstructor[] getConstructors()
        Description copied from class: CtClass
        Returns an array containing CtConstructor objects representing all the non-private constructors of the class.
        Overrides:
        getConstructors in class CtClass