Object

com.twitter.inject.utils

AnnotationUtils

Related Doc: package utils

Permalink

object AnnotationUtils

Utility methods for dealing with java.lang.annotation.Annotation

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AnnotationUtils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def annotationEquals[A <: Annotation](annotation: Annotation)(implicit arg0: Manifest[A]): Boolean

    Permalink

    Determines if the given Annotation has an annotation type of the given type param.

    Determines if the given Annotation has an annotation type of the given type param.

    A

    the type to match against.

    annotation

    the Annotation to match.

    returns

    true if the given Annotation is of type A, false otherwise.

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def filterAnnotations(filterSet: Set[Class[_ <: Annotation]], annotations: Seq[Annotation]): Seq[Annotation]

    Permalink

    Filters a list of annotations by annotation type discriminated by the set of given annotations.

    Filters a list of annotations by annotation type discriminated by the set of given annotations.

    filterSet

    the Set of Annotation classes by which to filter.

    annotations

    the list Annotation instances to filter.

    returns

    the filtered list of matching annotations.

  10. def filterIfAnnotationPresent[A <: Annotation](annotations: Seq[Annotation])(implicit arg0: Manifest[A]): Seq[Annotation]

    Permalink

    Filter a list of annotations discriminated on whether the annotation is itself annotated with the passed annotation.

    Filter a list of annotations discriminated on whether the annotation is itself annotated with the passed annotation.

    A

    the type of the annotation by which to filter.

    annotations

    the list of Annotation instances to filter.

    returns

    the filtered list of matching annotations.

  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def findAnnotation[A <: Annotation](annotations: Seq[Annotation])(implicit arg0: Manifest[A]): Option[A]

    Permalink

    Find an Annotation within a given list of annotations annotated by the given type param.

    Find an Annotation within a given list of annotations annotated by the given type param.

    A

    the type of the Annotation to find.

    annotations

    the list of Annotation instances to search.

    returns

    the matching Annotation instance if found, otherwise None.

  13. def findAnnotation(target: Class[_ <: Annotation], annotations: Seq[Annotation]): Option[Annotation]

    Permalink

    Find an Annotation within a given list of annotations of the given target.

    Find an Annotation within a given list of annotations of the given target. annotation type.

    target

    the class of the Annotation to find.

    annotations

    the list of Annotation instances to search.

    returns

    the matching Annotation instance if found, otherwise None.

  14. def findAnnotations(clazz: Class[_], fields: Seq[String]): Map[String, Seq[Annotation]]

    Permalink

    Attempts to find annotations per case class field returning a mapping of field name to list of any found annotations.

    Attempts to find annotations per case class field returning a mapping of field name to list of any found annotations.

    clazz

    the Class to inspect. This should represent a Scala case class.

    fields

    the list of case class fields.

    returns

    a mapping of field name to list of annotations.

    Note

    IMPORTANT: this is only intended for Scala case classes as it only tries to find annotations on constructors of the given class.

    See also

    Tour of Scala Case Classes

  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. def isAnnotationPresent[ToFindAnnotation <: Annotation, A <: Annotation](implicit arg0: Manifest[ToFindAnnotation], arg1: Manifest[A]): Boolean

    Permalink

    Determines if the given A is annotated by an Annotation of the given type param ToFindAnnotation.

    Determines if the given A is annotated by an Annotation of the given type param ToFindAnnotation.

    ToFindAnnotation

    the Annotation to match.

    A

    the type of the Annotation to determine if is annotated on the A.

    returns

    true if the given Annotation is annotated with an Annotation of type ToFindAnnotation, false otherwise.

  18. def isAnnotationPresent[A <: Annotation](annotation: Annotation)(implicit arg0: Manifest[A]): Boolean

    Permalink

    Determines if the given Annotation is annotated by an Annotation of the given type param.

    Determines if the given Annotation is annotated by an Annotation of the given type param.

    A

    the type of the Annotation to determine if is annotated on the Annotation.

    annotation

    the Annotation to match.

    returns

    true if the given Annotation is annotated with an Annotation of type A, false otherwise.

  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped