Interface Declared

All Superinterfaces:
AccessModifiable, Annotationable<TypeElement>, ApiHolder, ElementBacked<TypeElement>, MirrorBacked<DeclaredType>, Modifiable, QualifiedNameable<TypeElement>, Shadow<DeclaredType>, StrictfpModifiable
All Known Subinterfaces:
Annotation, AnnotationUsage, Class, Enum, Interface, Record
All Known Implementing Classes:
AnnotationUsageImpl, ClassImpl, DeclaredImpl, InterfaceImpl, RecordImpl

Anything that can be a file. Can be converted into the following using ShadowApi.convert(Declared)
  • Method Details

    • isSubtypeOf

      boolean isSubtypeOf(Shadow<? extends TypeMirror> shadow)
      returns true if this can be cast to that. This can be useful if you want to check if a shadow implements for example a Collection shadowToTest.erasure().isSubtypeOf(shadowApi.getDeclaredOrThrow("java.util.Collection").erasure())
    • getNesting

      NestingKind getNesting()
      is it an outer or inner class? etc.
    • getFieldOrThrow

      Field getFieldOrThrow(String simpleName)
    • getFields

      List<Field> getFields()
    • getMethods

      List<Method> getMethods(String simpleName)
    • getMethods

      List<Method> getMethods()
    • getConstructors

      List<Constructor> getConstructors()
    • getDirectSuperTypes

      List<Declared> getDirectSuperTypes()
      returns the parentClass including interfaces
    • getSuperTypes

      Set<Declared> getSuperTypes()
      returns all distinct supertypes including interfaces
    • getInterfaces

      List<Interface> getInterfaces()
    • getInterfaceOrThrow

      Interface getInterfaceOrThrow(String qualifiedName)
    • getDirectInterfaces

      List<Interface> getDirectInterfaces()
    • getDirectInterfaceOrThrow

      Interface getDirectInterfaceOrThrow(String qualifiedName)
    • getPackage

      Package getPackage()
    • getBinaryName

      String getBinaryName()
      part of the java language specification:

      The binary name of a top level type is its canonical name. (qualified name) The binary name of a member type consists of the binary name of its immediately enclosing type, followed by $, followed by the simple name of the member.

    • asExtendsWildcard

      Wildcard asExtendsWildcard()
    • asSuperWildcard

      Wildcard asSuperWildcard()
    • asArray

      Array asArray()
      String -> String[]
    • equals

      boolean equals(Object obj)
      be careful using this equals
      Specified by:
      equals in interface Shadow<DeclaredType>
      Overrides:
      equals in class Object
      See Also: