Class/Object

org.opalj.av.checking

HasAnnotation

Related Docs: object HasAnnotation | package checking

Permalink

case class HasAnnotation(annotationType: FieldType) extends AnnotationPredicate with Product with Serializable

Matches an annotation of a class, field, method or method parameter that has the specified type. The annotation is matched independent of the annotation's values.

Example

scala> import org.opalj.br._
scala> val foo = ObjectType("java/lang/Foo")
scala> val aw = org.opalj.av.checking.AnnotatedWith(foo)
aw: org.opalj.av.checking.AnnotatedWith = @java.lang.Foo
scala> aw(Annotation(foo,IndexedSeq(ElementValuePair("clazz",StringValue(" ")))))
res: Boolean = true
Source
AnnotationPredicate.scala
Linear Supertypes
Serializable, Serializable, Product, scala.Equals, AnnotationPredicate, SourceElementPredicate[ConcreteSourceElement], (ConcreteSourceElement) ⇒ Boolean, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HasAnnotation
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnnotationPredicate
  7. SourceElementPredicate
  8. Function1
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new HasAnnotation(annotationType: FieldType)

    Permalink

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 and[T <: ConcreteSourceElement, X <: ConcreteSourceElement with T](right: SourceElementPredicate[T]): SourceElementPredicate[X]

    Permalink
    Definition Classes
    SourceElementPredicate
  5. def andThen[A](g: (Boolean) ⇒ A): (ConcreteSourceElement) ⇒ A

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  6. val annotationType: FieldType

    Permalink
  7. def apply(sourceElement: ConcreteSourceElement): Boolean

    Permalink
    Definition Classes
    HasAnnotation → Function1
  8. def apply(other: Annotation): Boolean

    Permalink

    Checks if the type of the given annotation is the same as the type of this predicate.

    Checks if the type of the given annotation is the same as the type of this predicate.

    Definition Classes
    HasAnnotationAnnotationPredicate
  9. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def compose[A](g: (A) ⇒ ConcreteSourceElement): (A) ⇒ Boolean

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. final def having[T <: ConcreteSourceElement, X <: ConcreteSourceElement with T](right: SourceElementPredicate[T]): SourceElementPredicate[X]

    Permalink
    Definition Classes
    SourceElementPredicate
  16. final def isInstanceOf[T0]: Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  21. def toDescription(): String

    Permalink

    Returns a human readable representation of this predicate that is well suited for presenting it in messages related to architectural deviations.

    Returns a human readable representation of this predicate that is well suited for presenting it in messages related to architectural deviations.

    It should not end with a white space and should not use multiple lines. It should not be a complete sentence as this description may be composed with other descriptions.

    Definition Classes
    HasAnnotationAnnotationPredicateSourceElementPredicate
  22. def toString(): String

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

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

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

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

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from scala.Equals

Inherited from AnnotationPredicate

Inherited from (ConcreteSourceElement) ⇒ Boolean

Inherited from AnyRef

Inherited from Any

Ungrouped