package surface
- Alphabetic
- By Inheritance
- surface
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Package Members
- package tag
This code is from com.softwaremill.tagging
This code is from com.softwaremill.tagging
Tag instances with arbitrary types. The tags are usually empty
trait
s. Tags have no runtime overhead and are only used at compile-time for additional type safety.For example:
class Berry() trait Black trait Blue val berry = new Berry() val blackBerry: Berry @@ Black = berry.taggedWith[Black] val blueBerry: Berry @@ Blue = berry.taggedWith[Blue] // compile error: val anotherBlackBerry: Berry @@ Black = blueBerry
Original idea by Miles Sabin, see: https://gist.github.com/milessabin/89c9b47a91017973a35f
Type Members
- case class Alias(name: String, fullName: String, ref: Surface) extends GenericSurface with Product with Serializable
- case class ArraySurface(rawType: Class[_], elementSurface: Surface) extends GenericSurface with Product with Serializable
- class CName extends Comparable[CName]
Canonical name.
Canonical name. This name is used as a common name of wording variants (e.g., difference of capital letter usage, hyphenation, etc.)
- case class ClassMethodSurface(mod: Int, owner: Surface, name: String, returnType: Surface, args: Seq[MethodParameter], methodCaller: Option[(Any, Seq[Any]) => Any]) extends MethodSurface with Product with Serializable
- case class EnumSurface(rawType: Class[_], stringExtractor: (Class[_], String) => Option[Any]) extends GenericSurface with Product with Serializable
- class GenericSurface extends Surface
Base class for generic surfaces with type args
- case class HigherKindedTypeSurface(name: String, fullName: String, ref: Surface, typeArgs: Seq[Surface]) extends GenericSurface with Product with Serializable
- case class JavaEnumSurface(rawType: Class[_]) extends GenericSurface with Product with Serializable
- case class LazySurface(rawType: Class[_], fullName: String) extends Surface with Product with Serializable
Surface placeholder for supporting recursive types
- trait MethodParameter extends Parameter
- case class MethodRef(owner: Class[_], name: String, paramTypes: Seq[Class[_]], isConstructor: Boolean) extends Product with Serializable
- trait MethodSurface extends ParameterBase
- trait ObjectFactory extends Serializable
- case class OptionSurface(rawType: Class[_], elementSurface: Surface) extends GenericSurface with Product with Serializable
- trait Parameter extends ParameterBase
- sealed trait ParameterBase extends Serializable
- case class RecordParameter(index: Int, name: String, surface: Surface, isRequired: Boolean = false, isSecret: Boolean = false, defaultValue: Option[Any] = None) extends Parameter with Product with Serializable
- case class RecordSurface(name: String, fullName: String, rawType: Class[_] = classOf[Any], typeArgs: Seq[Surface] = Seq.empty, params: Seq[Parameter] = Seq.empty, isRequired: Boolean = false, isSecret: Boolean = false, isOption: Boolean = false, isPrimitive: Boolean = false, isSeq: Boolean = false, isArray: Boolean = false, isMap: Boolean = false, objectFactory: Option[ObjectFactory] = None) extends Surface with Product with Serializable
Surface for custom record types
- case class StdMethodParameter(method: MethodRef, index: Int, name: String, isRequired: Boolean, isSecret: Boolean, surface: Surface, defaultValue: Option[Any] = None, accessor: Option[(Any) => Any] = None) extends MethodParameter with Product with Serializable
Parameters of a Surface
- trait Surface extends Serializable
- case class TaggedSurface(base: Surface, tag: Surface) extends Surface with Product with Serializable
- case class TupleSurface(rawType: Class[_], typeArgs: Seq[Surface]) extends GenericSurface with Product with Serializable
- trait Union extends AnyRef
Union types
- trait Union2[A, B] extends Union
- trait Union3[A, B, C] extends Union
- trait required extends Annotation
- Annotations
- @Retention() @Target()
- trait secret extends Annotation
- Annotations
- @Retention() @Target()
Value Members
- def getCached(fullName: String): Surface
- val methodSurfaceCache: Map[String, Seq[MethodSurface]]
- def newCacheMap[A, B]: Map[A, B]
- val surfaceCache: Map[String, Surface]
- case object AnyRefSurface extends GenericSurface with Product with Serializable
- object CName
Utility for managing names written in different spellings.
Utility for managing names written in different spellings. For example, variable name localAddress can be written as "local address", "local_address", etc.
CanonicalName is the representative name of these variants.
CName("localAddress") == CName("local address") == CName("local_address")
- object CanonicalNameFormatter
- case object ExistentialType extends GenericSurface with Product with Serializable
- object MethodModifier
- object Primitive
- object RecordSurface extends Serializable
- object Surface extends Serializable
- object SurfaceFactory
- object Zero extends LogSupport
Create a default instance (zero) from Surface