java.lang.Object
org.tudalgo.algoutils.tutor.general.reflections.BasicTypeLink
All Implemented Interfaces:
Identifiable, Stringifiable, Link, TypeLink, WithCtElement, WithModifiers, WithName, WithType

public class BasicTypeLink extends Object implements TypeLink, WithCtElement
A basic implementation of a type link.
  • Method Details

    • of

      public static BasicTypeLink of(Class<?> type)
    • interfaces

      public Collection<BasicTypeLink> interfaces()
      Description copied from interface: TypeLink

      Returns a collection of all interfaces extended (interfaces) or implemented (classes and enums) by the type linked by this type link.

      Specified by:
      interfaces in interface TypeLink
      Returns:
      the collection of interfaces
    • superType

      public TypeLink superType()
      Description copied from interface: TypeLink

      Returns the type link to the super type of the type linked by this type link.

      Specified by:
      superType in interface TypeLink
      Returns:
      the link to the super type
    • getFields

      public List<BasicFieldLink> getFields()
      Description copied from interface: TypeLink

      Returns a collection of all fields contained in the type linked by this type link.

      Specified by:
      getFields in interface TypeLink
      Returns:
      the collection of fields
    • getConstructors

      public Collection<BasicConstructorLink> getConstructors()
      Description copied from interface: TypeLink

      Returns a collection of constructors declared in the type linked by this type link.

      Specified by:
      getConstructors in interface TypeLink
      Returns:
      the collection of constructors
    • getEnumConstants

      public Collection<BasicEnumConstantLink> getEnumConstants()
      Description copied from interface: TypeLink

      Returns a collection of all enum constants contained in the type linked by this type link.

      Specified by:
      getEnumConstants in interface TypeLink
      Returns:
      the collection of enum constants
    • identifier

      public String identifier()
      Description copied from interface: Identifiable

      Returns the identifier of this identifiable object.

      Specified by:
      identifier in interface Identifiable
      Specified by:
      identifier in interface WithName
      Returns:
      the identifier
    • reflection

      public Class<?> reflection()
      Description copied from interface: TypeLink

      Returns the actual type behind this type link.

      Specified by:
      reflection in interface Link
      Specified by:
      reflection in interface TypeLink
      Returns:
      the type
    • kind

      public Link.Kind kind()
      Specified by:
      kind in interface Link
    • getMethods

      public Collection<BasicMethodLink> getMethods()
      Description copied from interface: TypeLink

      Returns a collection of all methods contained in the type linked by this type link.

      Specified by:
      getMethods in interface TypeLink
      Returns:
      the collection of methods
    • getCtElement

      public spoon.reflect.declaration.CtElement getCtElement()
      Description copied from interface: WithCtElement
      Returns the CtElement associated with the element behind this link.
      Specified by:
      getCtElement in interface WithCtElement
      Returns:
      the CtElement