Interface Adaptor<S,T>


public interface Adaptor<S,T>
The adaptor to the underlying AST (javax.lang.model, PSI).
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a SrcElement for the given type.
    collectionOf(T componentType)
    Returns the type of a Collection with the given component type.
    componentTypeOfIterable(T iterableType)
    Returns the component type of a given Iterable or some NoType, if the given type is not an Iterable.
    io.vavr.collection.Seq<SrcElement<S,T>>
    Returns all constructors in the given type.
    io.vavr.collection.Seq<SrcElement<S,T>>
    Returns all methods declared in the given type.
    boolean
    True, if the given type has type parameters.
    boolean
    True, if the type is an annotation type.
    boolean
    isEnumType(T type)
    True, if the type is an enum type.
    boolean
    isInterface(T type)
    True, if the given type is an interface.
    default boolean
    isNoType(T type)
    True, if the type is a pseudo-type (void, error).
    boolean
    isPrimitive(T type)
    True, if the type represents a primitive type (void is not treated as type).
    boolean
    True, if the type is a record type.
    boolean
    isReference(T type)
    True, if the type represents a reference type.
    boolean
    isSubtypeOf(T left, T right)
    True, if left is a subtype of right.
    iterableOf(T componentType)
    Returns the type of an Iterable with the given component type.
    listOf(T componentType)
    Returns the type of a List with the given component type.
    Returns the no type.
    packageOf(SrcElement<S,T> element)
    Returns the package name of the given element.
    io.vavr.collection.Seq<Adaptor.SuperType<T>>
    superTypes(T type)
    Returns the super types of the given types.
    Returns a type or a (NoType if not found.
  • Method Details

    • isSubtypeOf

      boolean isSubtypeOf(T left, T right)
      True, if left is a subtype of right. Primitives are only subtypes of themselves.
    • isReference

      boolean isReference(T type)
      True, if the type represents a reference type.
    • hasTypeParameters

      boolean hasTypeParameters(T type)
      True, if the given type has type parameters.
    • isInterface

      boolean isInterface(T type)
      True, if the given type is an interface.
    • isPrimitive

      boolean isPrimitive(T type)
      True, if the type represents a primitive type (void is not treated as type).
    • isNoType

      default boolean isNoType(T type)
      True, if the type is a pseudo-type (void, error).
    • isEnumType

      boolean isEnumType(T type)
      True, if the type is an enum type.
    • isAnnotationType

      boolean isAnnotationType(T type)
      True, if the type is an annotation type.
    • isRecordType

      boolean isRecordType(T type)
      True, if the type is a record type.
    • typeOf

      T typeOf(ClassRef ref)
      Returns a type or a (NoType if not found.
    • classElement

      SrcElement<S,T> classElement(T type)
      Returns a SrcElement for the given type.
    • superTypes

      io.vavr.collection.Seq<Adaptor.SuperType<T>> superTypes(T type)
      Returns the super types of the given types.
    • declaredMethods

      io.vavr.collection.Seq<SrcElement<S,T>> declaredMethods(T type)
      Returns all methods declared in the given type. This does not include inherited methods, but it does include overridden methods.
    • constructors

      io.vavr.collection.Seq<SrcElement<S,T>> constructors(T type)
      Returns all constructors in the given type.
    • packageOf

      String packageOf(SrcElement<S,T> element)
      Returns the package name of the given element.
    • iterableOf

      T iterableOf(T componentType)
      Returns the type of an Iterable with the given component type.
    • collectionOf

      T collectionOf(T componentType)
      Returns the type of a Collection with the given component type.
    • listOf

      T listOf(T componentType)
      Returns the type of a List with the given component type.
    • componentTypeOfIterable

      T componentTypeOfIterable(T iterableType)
      Returns the component type of a given Iterable or some NoType, if the given type is not an Iterable.
    • noType

      T noType()
      Returns the no type.