AnnotationUtils

org.encalmo.utils.AnnotationUtils

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case class AnnotationInfo(name: String, params: Map[String, Any])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def annotationsOf[A](using evidence$1: Type[A], Quotes): Set[AnnotationInfo]
def computeFieldAnnotations[A](fieldName: String)(using evidence$1: Type[A], Quotes): Set[AnnotationInfo]
def getFieldAnnotations[A](fieldName: String)(using evidence$1: Type[A], Quotes): List[x$2.reflect.Term]
def getValueAnnotations[A](value: Expr[A])(using evidence$1: Type[A], Quotes): Set[AnnotationInfo]

Extensions

Extensions

extension (annotations: Set[AnnotationInfo])
def exists[Annotation <: StaticAnnotation](using evidence$1: Type[Annotation], Quotes): Boolean
def get[Annotation <: StaticAnnotation : Type, T : ToExpr](using Quotes)(parameter: String): Option[Expr[T]]
def getOrDefault[Annotation <: StaticAnnotation : Type, T : ToExpr](using Quotes)(parameter: String, defaultValue: Expr[T]): Expr[T]
extension (using Quotes)(annotations: List[x$1.reflect.Term])
def exists[Annotation <: StaticAnnotation : Type]: Boolean

Check if contains an annotation of the given type.

Check if contains an annotation of the given type.

Attributes

def get[Annotation <: StaticAnnotation : Type, T : Type : ToExpr](parameter: String): Option[Expr[T]]

Get the value of an annotation of the given type.

Get the value of an annotation of the given type.

Attributes

def getOrDefault[Annotation <: StaticAnnotation : Type, T : Type : ToExpr](parameter: String, defaultValue: Expr[T]): Expr[T]

Get the value of an annotation of the given type, or return the default value if annotation not exists.

Get the value of an annotation of the given type, or return the default value if annotation not exists.

Attributes