Package javassist

Class CtArray


final class CtArray extends CtClass
Array types.
  • Field Details

  • Constructor Details

  • Method Details

    • getClassPool

      public ClassPool getClassPool()
      Description copied from class: CtClass
      Returns a ClassPool for this class.
      Overrides:
      getClassPool in class CtClass
    • 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:
    • 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
    • subtypeOf

      public boolean subtypeOf(CtClass clazz) throws NotFoundException
      Description copied from class: CtClass
      Returns true if this class extends or implements clazz. It also returns true if this class is the same as clazz.
      Overrides:
      subtypeOf in class CtClass
      Throws:
      NotFoundException
    • getComponentType

      public CtClass getComponentType() throws NotFoundException
      Description copied from class: CtClass
      If this object represents an array, this method returns the component type of the array. Otherwise, it returns null.
      Overrides:
      getComponentType 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(String name, 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:
    • 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