EnumUtils

org.encalmo.utils.EnumUtils
object EnumUtils

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
EnumUtils.type

Members list

Value members

Concrete methods

def isEnumOrSealedADT[A](using evidence$1: Type[A], Quotes): Boolean

Check if a type is an enum or a sealed abstract type.

Check if a type is an enum or a sealed abstract type.

Attributes

def isJavaEnum[A](using evidence$1: Type[A], Quotes): Boolean

Check if a type is a Java enum.

Check if a type is a Java enum.

Attributes

def transformToMatchExpression[In](valueExpr: Expr[In], functionWhenCaseValueExpr: [A] => (x$1: Expr[String], x$2: Expr[A], x$3: Set[AnnotationInfo]) => Type[A] ?=> Expr[Any], functionWhenCaseClassExpr: [A] => (x$1: Expr[String], x$2: Expr[A], x$3: Set[AnnotationInfo]) => Type[A] ?=> Expr[Any])(using evidence$1: Type[In], quotes: Quotes): Expr[Unit]

Visit an enum and create a pattern match expression of enum cases.

Visit an enum and create a pattern match expression of enum cases.

Attributes

Returns

Unit

def transformToMatchTerm[In : Type](using cache: StatementsCache)(valueTerm: cache.quotes.reflect.Term, functionWhenCaseValueExpr: [A] => (x$1: String, x$2: cache.quotes.reflect.Term, x$3: Set[AnnotationInfo]) => Type[A] ?=> cache.quotes.reflect.Term, functionWhenCaseClassExpr: [A] => (x$1: String, x$2: cache.quotes.reflect.Term, x$3: Set[AnnotationInfo]) => Type[A] ?=> cache.quotes.reflect.Term): cache.quotes.reflect.Term

Visit an enum, create a pattern match stattement of enum cases.

Visit an enum, create a pattern match stattement of enum cases.

Attributes

Returns

Unit