Interface ResolvedTypeDeclaration

    • Method Detail

      • getInternalType

        default ResolvedReferenceTypeDeclaration getInternalType​(java.lang.String name)
        Returns a type declaration for the internal type based on name. (Does not include internal types inside internal types).
      • hasInternalType

        default boolean hasInternalType​(java.lang.String name)
        Does this type contain an internal type with the given name? (Does not include internal types inside internal types).
      • isClass

        default boolean isClass()
        Is this the declaration of a class? Note that an Enum is not considered a Class in this case.
      • isInterface

        default boolean isInterface()
        Is this the declaration of an interface?
      • isEnum

        default boolean isEnum()
        Is this the declaration of an enum?
      • isAnnotation

        default boolean isAnnotation()
        Is this the declaration of an annotation?
      • isReferenceType

        default boolean isReferenceType()
        Is this the declaration of a reference type?
      • isTypeParameter

        default boolean isTypeParameter()
        Is this the declaration of a type parameter?
      • isAnonymousClass

        default boolean isAnonymousClass()
        Is this type declaration corresponding to an anonymous class? This is an example of anonymous class:
         HelloWorld frenchGreeting = new HelloWorld() {
             String name = "tout le monde";
        
             public void greet() {
                 greetSomeone("tout le monde");
             }
        
             public void greetSomeone(String someone) {
                 name = someone;
                 System.out.println("Salut " + name);
             }
         };
         
      • asClass

        default ResolvedClassDeclaration asClass()
        Return this as a ClassDeclaration or throw UnsupportedOperationException.
      • asInterface

        default ResolvedInterfaceDeclaration asInterface()
        Return this as a InterfaceDeclaration or throw UnsupportedOperationException.
      • asEnum

        default ResolvedEnumDeclaration asEnum()
        Return this as a EnumDeclaration or throw UnsupportedOperationException.
      • asAnnotation

        default ResolvedAnnotationDeclaration asAnnotation()
        Return this as a AnnotationDeclaration or throw UnsupportedOperationException.
      • asTypeParameter

        default ResolvedTypeParameterDeclaration asTypeParameter()
        Return this as a TypeParameterDeclaration or throw UnsupportedOperationException.
      • getPackageName

        java.lang.String getPackageName()
        The package name of the type.
      • getClassName

        java.lang.String getClassName()
        The class(es) wrapping this type.
      • getQualifiedName

        java.lang.String getQualifiedName()
        The fully qualified name of the type declared.
      • getId

        default java.lang.String getId()
        The ID corresponds most of the type to the qualified name. It differs only for local classes which do not have a qualified name but have an ID.