Class CdiType

All Implemented Interfaces:
Owner<Type>

public class CdiType extends JavaType
A JavaType with a flexible means of describing its direct supertypes, suitable only, probaly, for CDI use cases.
Author:
Laird Nelson
  • Constructor Details

  • Method Details

    • directSupertypes

      Returns an unmodifiable and immutable Collection of the direct supertypes of this CdiType as provided by the directSupertypesFunction supplied at construction time.
      Overrides:
      directSupertypes in class JavaType
      Returns:
      an unmodifiable and immutable Collection of the direct supertypes of this JavaType; never null
      Idempotency:
      This method is, and its overrides must be, idempotent and deterministic, though the ordering of elements within returned Collections is undefined
      Nullability:
      This method does not, and its overrides must not, return null.
      Thread Safety:
      This method is, and its overrides must be, safe for concurrent use by multiple threads.
    • of

      public static final CdiType of(JavaType.Token<?> type)
      Creates a new CdiType.
      Parameters:
      type - a JavaType.Token representing the type to model; must not be null
      Returns:
      a new CdiType; never null
      Throws:
      NullPointerException - if type is null.
      See Also:
      Idempotency:
      This method is idempotent but not deterministic (in that it returns a new CdiType with each invocation). However, any CdiType returned from this method is guaranteed to equal any other CdiType returned from this method, provided the inputs to all invocations are equal.
      Nullability:
      This method never returns null.
      Thread Safety:
      This method is safe for concurrent use by multiple threads.
    • of

      public static final CdiType of(JavaType.Token<?> type, boolean box)
      Creates a new CdiType.
      Parameters:
      type - a JavaType.Token representing the type to model; must not be null
      box - whether autoboxing is enabled; must be true because CDI requires autoboxing; see JavaType.of(Token, boolean) which this method shadows
      Returns:
      a new CdiType; never null
      Throws:
      NullPointerException - if type is null.
      IllegalArgumentException - if box is false; CDI requires autoboxing
      See Also:
      Idempotency:
      This method is idempotent but not deterministic (in that it returns a new CdiType with each invocation). However, any CdiType returned from this method is guaranteed to equal any other CdiType returned from this method, provided the inputs to all invocations are equal.
      Nullability:
      This method never returns null.
      Thread Safety:
      This method is safe for concurrent use by multiple threads.
    • of

      public static final CdiType of(Type type)
      Creates a new CdiType.
      Parameters:
      type - the Type that will be modeled; must not be null
      Returns:
      a new CdiType; never null
      Throws:
      NullPointerException - if type is null.
      Idempotency:
      This method is idempotent but not deterministic (in that it returns a new CdiType with each invocation). However, any CdiType returned from this method is guaranteed to equal any other CdiType returned from this method, provided the inputs to all invocations are equal.
      Nullability:
      This method never returns null.
      Thread Safety:
      This method is safe for concurrent use by multiple threads.
    • of

      public static JavaType of(Type type, boolean box)
      Creates a new CdiType.
      Parameters:
      type - the Type that will be modeled; must not be null
      box - whether autoboxing is enabled; must be true because CDI requires autoboxing; see JavaType.of(Type, boolean) which this method shadows
      Returns:
      a new CdiType; never null
      Throws:
      NullPointerException - if type is null.
      IllegalArgumentException - if box is false; CDI requires autoboxing
      See Also:
      Idempotency:
      This method is idempotent but not deterministic (in that it returns a new CdiType with each invocation). However, any CdiType returned from this method is guaranteed to equal any other CdiType returned from this method, provided the inputs to all invocations are equal.
      Nullability:
      This method never returns null.
      Thread Safety:
      This method is safe for concurrent use by multiple threads.