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 class  Adaptor.SuperType<T>  
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      ch.raffael.meldioc.model.CElement<S,​T> classElement​(T type)
      Returns a Celement for the given type.
      T collectionOf​(T componentType)
      Returns the type of a Collection with the given component type.
      T 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<ch.raffael.meldioc.model.CElement<S,​T>> constructors​(T type)
      Returns all constructors in the given type.
      io.vavr.collection.Seq<ch.raffael.meldioc.model.CElement<S,​T>> declaredMethods​(T type)
      Returns all methods declared in the given type.
      boolean hasTypeParameters​(T type)
      True, if the given type has type parameters.
      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 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.
      T iterableOf​(T componentType)
      Returns the type of an Iterable with the given component type.
      T listOf​(T componentType)
      Returns the type of a List with the given component type.
      T noType()
      Returns the no type.
      java.lang.String packageOf​(ch.raffael.meldioc.model.CElement<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.
      T typeOf​(ch.raffael.meldioc.model.ClassRef ref)
      Returns a type or a (NoType if not found.
    • Method Detail

      • 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.
      • typeOf

        T typeOf​(ch.raffael.meldioc.model.ClassRef ref)
        Returns a type or a (NoType if not found.
      • classElement

        ch.raffael.meldioc.model.CElement<S,​T> classElement​(T type)
        Returns a Celement 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<ch.raffael.meldioc.model.CElement<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<ch.raffael.meldioc.model.CElement<S,​T>> constructors​(T type)
        Returns all constructors in the given type.
      • packageOf

        java.lang.String packageOf​(ch.raffael.meldioc.model.CElement<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.