Class ClassInfo.EnclosingMethodInfo

  • Enclosing class:
    ClassInfo

    public static final class ClassInfo.EnclosingMethodInfo
    extends java.lang.Object
    Provides information on the enclosing method or constructor for a local or anonymous class, if available.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      DotName enclosingClass()
      Returns the name of the class which declares the enclosing method or constructor.
      java.lang.String name()
      Returns the name of the method or constructor.
      java.util.List<Type> parameters()
      Returns the list of parameter types declared by the enclosing method or constructor.
      (package private) Type[] parametersArray()  
      Type returnType()
      Returns the return type of the enclosing method.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        private java.lang.String name
      • returnType

        private Type returnType
      • parameters

        private Type[] parameters
      • enclosingClass

        private DotName enclosingClass
    • Constructor Detail

      • EnclosingMethodInfo

        EnclosingMethodInfo​(java.lang.String name,
                            Type returnType,
                            Type[] parameters,
                            DotName enclosingClass)
    • Method Detail

      • name

        public java.lang.String name()
        Returns the name of the method or constructor.
        Returns:
        the name of the method or constructor
      • returnType

        public Type returnType()
        Returns the return type of the enclosing method.
        Returns:
        the return type
      • parameters

        public java.util.List<Type> parameters()
        Returns the list of parameter types declared by the enclosing method or constructor.

        The list may be empty, but never null.

        Returns:
        the list of parameter types
      • parametersArray

        Type[] parametersArray()
      • enclosingClass

        public DotName enclosingClass()
        Returns the name of the class which declares the enclosing method or constructor.
        Returns:
        the name of the class which declares the enclosing method or constructor
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object