EnumUtils

org.encalmo.utils.EnumUtils
object EnumUtils

Attributes

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

Members list

Type members

Classlikes

enum EnumType

Attributes

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

Check if a type is a Scala3 enum or a sealed abstract type, or a Java enum.

Check if a type is a Scala3 enum or a sealed abstract type, or a Java enum.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Value members

Concrete methods

def findEnumCases(using cache: StatementsCache)(tpe: cache.quotes.reflect.TypeRepr): List[(cache.quotes.reflect.Symbol, EnumType)]
def hasEnumCaseClasses(using cache: StatementsCache)(tpe: cache.quotes.reflect.TypeRepr): Boolean
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 transformToMatchTerm(using cache: StatementsCache)(tpe: cache.quotes.reflect.TypeRepr, valueTerm: cache.quotes.reflect.Term, functionWhenCaseValue: (cache.quotes.reflect.TypeRepr, String, cache.quotes.reflect.Term, Set[AnnotationInfo]) => cache.quotes.reflect.Term, functionWhenCaseClass: (cache.quotes.reflect.TypeRepr, String, cache.quotes.reflect.Term, Set[AnnotationInfo]) => 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

def visitTermless(using cache: StatementsCache)(tpe: cache.quotes.reflect.TypeRepr, functionWhenCaseValue: (cache.quotes.reflect.TypeRepr, String, Set[AnnotationInfo]) => Unit, functionWhenCaseClass: (cache.quotes.reflect.TypeRepr, String, Set[AnnotationInfo]) => Unit): Unit