Interface TypeDeclaration

    • Method Detail

      • getDeclaredMembers

        java.lang.Iterable<? extends MemberDeclaration> getDeclaredMembers()
        Returns:
        the members directly declared and contained in the type declaration
      • getDeclaredMethods

        java.lang.Iterable<? extends MethodDeclaration> getDeclaredMethods()
        Returns:
        the methods directly declared and contained in the type declaration
      • getDeclaredFields

        java.lang.Iterable<? extends FieldDeclaration> getDeclaredFields()
        Returns:
        the fields directly declared and contained in the type declaration
      • getDeclaredConstructors

        java.lang.Iterable<? extends ConstructorDeclaration> getDeclaredConstructors()
        Returns:
        the constructors directly declared and contained in the type declaration
      • getDeclaredClasses

        java.lang.Iterable<? extends ClassDeclaration> getDeclaredClasses()
        Returns:
        the classes directly declared and contained in the type declaration
      • getDeclaredInterfaces

        java.lang.Iterable<? extends InterfaceDeclaration> getDeclaredInterfaces()
        Returns:
        the interfaces directly declared and contained in the type declaration
      • getDeclaredEnumerationTypes

        java.lang.Iterable<? extends EnumerationTypeDeclaration> getDeclaredEnumerationTypes()
        Returns:
        the enumeration types directly declared and contained in this type declaration
        Since:
        2.8
      • getDeclaredAnnotationTypes

        java.lang.Iterable<? extends AnnotationTypeDeclaration> getDeclaredAnnotationTypes()
        Returns:
        the annotation types directly declared and contained in this type declaration
        Since:
        2.8
      • getDeclaredTypes

        java.lang.Iterable<? extends TypeDeclaration> getDeclaredTypes()
        Returns:
        the types directly declared and contained in this type declaration
        Since:
        2.8
      • findDeclaredField

        FieldDeclaration findDeclaredField​(java.lang.String name)
        Parameters:
        name - of the feature
        Returns:
        the declared field with the given name or null of no such field exists.
      • findDeclaredType

        TypeDeclaration findDeclaredType​(java.lang.String name)
        Parameters:
        name - of the nested type
        Returns:
        the declared, nested type with the given name or null of no such type exists.
        Since:
        2.8
      • findDeclaredMethod

        MethodDeclaration findDeclaredMethod​(java.lang.String name,
                                             TypeReference... parameterTypes)
        Parameters:
        name - of the method
        parameterTypes - - the types of the method
        Returns:
        the declared method with the given name and the specified parameter types or null if no such method exists.
      • findDeclaredConstructor

        ConstructorDeclaration findDeclaredConstructor​(TypeReference... parameterTypes)
        Parameters:
        parameterTypes - - the parameter types of the constructor
        Returns:
        the declared constructor with the exact same parameter types or null if no such constructors exists.