mockspresso-reflect / com.episode6.hackit.mockspresso.reflect / AnnotationLiteral

AnnotationLiteral

abstract class AnnotationLiteral<T : Annotation!> : Serializable

Supports inline instantiation of annotation type instances.

An instance of an annotation type may be obtained by subclassing AnnotationLiteral.


  public abstract class PayByQualifier
        extends AnnotationLiteral<PayBy>
        implements PayBy {}
  

  PayBy paybyCheque = new PayByQualifier() { public PaymentMethod value() { return CHEQUE; } };
  

Author
Pete Muir

Author
Gavin King see javax.enterprise.inject.Instance#select(Annotation...) see javax.enterprise.event.Event#select(Annotation...)

Constructors

<init>

AnnotationLiteral()

Functions

annotationType

open fun annotationType(): Class<out Annotation!>!

equals

open fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Inheritors

NamedAnnotationLiteral

open class NamedAnnotationLiteral : AnnotationLiteral<Named!>, Named

A convenience annotation literal for the @Named annotation.