Interface TypedElementInfo

All Superinterfaces:
Annotated, Prototype.Api
All Known Implementing Classes:
TypedElementInfo.BuilderBase.TypedElementInfoImpl

public interface TypedElementInfo extends Prototype.Api
An annotation with defined values.
See Also:
  • Method Details

    • builder

      static TypedElementInfo.Builder builder()
      Create a new fluent API builder to customize configuration.
      Returns:
      a new builder
    • builder

      static TypedElementInfo.Builder builder(TypedElementInfo instance)
      Create a new fluent API builder from an existing instance.
      Parameters:
      instance - an existing instance used as a base for the builder
      Returns:
      a builder based on an instance
    • toDeclaration

      String toDeclaration()
      Provides a description for this instance.
      Returns:
      provides the {typeName}{space}{elementName}
    • description

      Optional<String> description()
      Description, such as javadoc, if available.
      Returns:
      description of this element
    • typeName

      TypeName typeName()
      The type name for the element (e.g., java.util.List). If the element is a method, then this is the return type of the method.
      Returns:
      the type name of the element
    • elementName

      String elementName()
      The element (e.g., method, field, etc) name.
      Returns:
      the name of the element
    • elementTypeKind

      @Deprecated(forRemoval=true, since="4.1.0") String elementTypeKind()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use TypedElementInfoBlueprint.kind() instead
      The kind of element (e.g., method, field, etc).
      Returns:
      the element kind
      See Also:
    • kind

      ElementKind kind()
      The kind of element (e.g., method, field, etc).
      Returns:
      the element kind
      See Also:
    • defaultValue

      Optional<String> defaultValue()
      The default value assigned to the element, represented as a string.
      Returns:
      the default value as a string
    • elementTypeAnnotations

      List<Annotation> elementTypeAnnotations()
      The list of known annotations on the type name referenced by TypedElementInfoBlueprint.typeName().
      Returns:
      the list of annotations on this element's (return) type.
    • componentTypes

      List<TypeName> componentTypes()
      Returns the component type names describing the element.
      Returns:
      the component type names of the element
    • modifiers

      @Deprecated(forRemoval=true, since="4.1.0") Set<String> modifiers()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use TypedElementInfoBlueprint.elementModifiers() instead
      Element modifiers.
      Returns:
      element modifiers
      See Also:
    • elementModifiers

      Set<Modifier> elementModifiers()
      Element modifiers.
      Returns:
      element modifiers
      See Also:
    • accessModifier

      AccessModifier accessModifier()
      Access modifier of the element.
      Returns:
      access modifier
    • enclosingType

      Optional<TypeName> enclosingType()
      The enclosing type name for this typed element. Applicable when this instance represents a ElementKind.FIELD, or ElementKind.METHOD, or ElementKind.PARAMETER
      Returns:
      the enclosing type element
    • parameterArguments

      List<TypedElementInfo> parameterArguments()
      Parameter arguments applicable if this type element represents a ElementKind.METHOD. Each instance of this list will be the individual ElementKind.PARAMETER's for the method.
      Returns:
      the list of parameters belonging to this method if applicable
    • throwsChecked

      Set<TypeName> throwsChecked()
      List of all thrown types that are checked (Exception and Error).
      Returns:
      set of thrown checked types
    • originatingElement

      Optional<Object> originatingElement()
      The element used to create this instance. The type of the object depends on the environment we are in - it may be an Element in annotation processing, or a MethodInfo (and such) when using classpath scanning.
      Returns:
      originating element