GenMonocleLens

scalaxb.compiler.xsd.GenMonocleLens
class GenMonocleLens(var config: Config) extends GenLens, ContextProcessor

This class generates lens for Monocle. it is inspired from Gerolf Seitz work: Lensed

object PurchaseOrderType { def shipTo: monocle.Lens[PurchaseOrderType, ipo.Addressable] = monocle.LensPurchaseOrderType, ipo.Addressable((shipTo: ipo.Addressable) => (purchaseordertype: PurchaseOrderType) => purchaseordertype.copy(shipTo = shipTo)) def billTo: monocle.Lens[PurchaseOrderType, ipo.Addressable] = monocle.LensPurchaseOrderType, ipo.Addressable((billTo: ipo.Addressable) => (purchaseordertype: PurchaseOrderType) => purchaseordertype.copy(billTo = billTo)) def comment: monocle.Lens[PurchaseOrderType, Option[String]] = monocle.LensPurchaseOrderType, Option[String]((comment: Option[String]) => (purchaseordertype: PurchaseOrderType) => purchaseordertype.copy(comment = comment)) def items: monocle.Lens[PurchaseOrderType, ipo.Items] = monocle.LensPurchaseOrderType, ipo.Items((items: ipo.Items) => (purchaseordertype: PurchaseOrderType) => purchaseordertype.copy(items = items)) def attributes: monocle.Lens[PurchaseOrderType, Map[String, scalaxb.DataRecord[Any]]] = monocle.LensPurchaseOrderType, Map[String, scalaxb.DataRecord[Any]]((attributes: Map[String, scalaxb.DataRecord[Any]]) => (purchaseordertype: PurchaseOrderType) => purchaseordertype.copy(attributes = attributes))

class PurchaseOrderTypeW[A](l: monocle.Lens[A, PurchaseOrderType]) { def shipTo: monocle.Lens[A, ipo.Addressable] = l composeLens PurchaseOrderType.shipTo def billTo: monocle.Lens[A, ipo.Addressable] = l composeLens PurchaseOrderType.billTo def comment: monocle.Lens[A, Option[String]] = l composeLens PurchaseOrderType.comment def items: monocle.Lens[A, ipo.Items] = l composeLens PurchaseOrderType.items def attributes: monocle.Lens[A, Map[String, scalaxb.DataRecord[Any]]] = l composeLens PurchaseOrderType.attributes }

implicit def lens2PurchaseOrderTypeW[A](l: monocle.Lens[A, PurchaseOrderType]): PurchaseOrderTypeW[A] = new PurchaseOrderTypeW(l) }

Attributes

Graph
Supertypes
trait PackageName
trait ScalaNames
trait GenLens
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def buildDefComposeLens(className: String, param: Param): String
def buildDefLens(className: String, param: Param): String
def buildImport: String
override def buildObjectLens(localName: String, defLenses: String, defComposeLenses: String): String

Attributes

Definition Classes
def escapeKeyWord(name: String): String

Inherited methods

def containsEnumeration(decl: SimpleTypeDecl): Boolean

Attributes

Inherited from:
ContextProcessor
def containsSingleChoice(seq: SequenceDecl): Boolean

Attributes

Inherited from:
ContextProcessor

Attributes

Inherited from:
ContextProcessor
def generateAutoPackages(schemas: Seq[SchemaDecl]): Seq[(Option[String], Option[String])]

Attributes

Inherited from:
ContextProcessor
def getTypeGlobally(namespace: Option[String], typeName: String, context: XsdContext): TypeDecl

Attributes

Inherited from:
ContextProcessor
def identifier(value: String): String

Attributes

Inherited from:
ContextProcessor
def indent(indent: Int): String

Attributes

Inherited from:
ContextProcessor
def isCommonlyUsedWord(s: String): Boolean

Attributes

Inherited from:
ScalaNames
def isKeyword(str: String): Boolean

Attributes

Inherited from:
ScalaNames
def isSpecialAttributeWord(str: String): Boolean

Attributes

Inherited from:
ScalaNames
def isWrapped(namespace: Option[String], family: List[String]): Boolean

Attributes

Inherited from:
ContextProcessor
def isWrapped(decl: ComplexTypeDecl): Boolean

Attributes

Inherited from:
ContextProcessor
def makeCompositorNames(context: XsdContext): Unit

Attributes

Inherited from:
ContextProcessor
def makeEnumValues(decl: SimpleTypeDecl, scope: NamespaceBinding, context: XsdContext): Unit

Attributes

Inherited from:
ContextProcessor

Attributes

Inherited from:
ContextProcessor
def makeParamName(name0: String, attribute: Boolean): String

Attributes

Inherited from:
ContextProcessor
def makePrefix(namespace: Option[String], context: XsdContext): String

Attributes

Inherited from:
ContextProcessor
def makeProtectedTypeName(namespace: Option[String], group: AttributeGroupDecl, context: XsdContext): String

Attributes

Inherited from:
ContextProcessor
def makeProtectedTypeName(namespace: Option[String], attr: AttributeDecl, context: XsdContext): String

Attributes

Inherited from:
ContextProcessor
def makeProtectedTypeName(namespace: Option[String], decl: SimpleTypeDecl, context: XsdContext): String

Attributes

Inherited from:
ContextProcessor
def makeProtectedTypeName(namespace: Option[String], decl: ComplexTypeDecl, context: XsdContext): String

Attributes

Inherited from:
ContextProcessor
def makeProtectedTypeName(namespace: Option[String], prefix: Option[String], elem: ElemDecl, context: XsdContext): String

Attributes

Inherited from:
ContextProcessor
def makeProtectedTypeName(schema: SchemaDecl, context: XsdContext): String

Attributes

Inherited from:
ContextProcessor
def makeProtectedTypeName(namespace: Option[String], initialName: String, postfix: String, context: XsdContext): String

Attributes

Inherited from:
ContextProcessor
def makeTraitName(decl: ComplexTypeDecl): String

Attributes

Inherited from:
ContextProcessor
def makeTypeName(name: String): String

Attributes

Inherited from:
ContextProcessor
def packageName(namespace: Option[String], context: XsdContext): Option[String]

Attributes

Inherited from:
PackageName
def packageName(group: AttributeGroupDecl, context: XsdContext): Option[String]

Attributes

Inherited from:
PackageName
def packageName(decl: SimpleTypeDecl, context: XsdContext): Option[String]

Attributes

Inherited from:
PackageName
def packageName(decl: ComplexTypeDecl, context: XsdContext): Option[String]

Attributes

Inherited from:
PackageName
def packageName(schema: SchemaDecl, context: XsdContext): Option[String]

Attributes

Inherited from:
PackageName
def processContext(context: XsdContext, schemas: Seq[SchemaDecl]): Unit

Attributes

Inherited from:
ContextProcessor
def quote(value: String): String

Attributes

Inherited from:
ContextProcessor
def quote(value: Option[String]): String

Attributes

Inherited from:
ContextProcessor
def resolveType(schema: SchemaDecl, context: XsdContext): Unit

Attributes

Inherited from:
ContextProcessor

Attributes

Inherited from:
ContextProcessor
def splitLong[A <: HasParticle](rest: List[Particle])(f: List[Particle] => A): List[A]

Attributes

Inherited from:
ContextProcessor
def startsWithNumber(name: String): Boolean

Attributes

Inherited from:
ContextProcessor

Concrete fields

var config: Config

Inherited fields

val XML_PREFIX: String

Attributes

Inherited from:
ContextProcessor
val XML_URI: String

Attributes

Inherited from:
ContextProcessor
val XSI_PREFIX: String

Attributes

Inherited from:
ContextProcessor
val XSI_URL: String

Attributes

Inherited from:
ContextProcessor
val XS_PREFIX: String

Attributes

Inherited from:
ContextProcessor
val XS_URL: String

Attributes

Inherited from:
ContextProcessor
lazy val contentsSizeLimit: Int

Attributes

Inherited from:
ContextProcessor
lazy val enumNameMaxLength: Int

Attributes

Inherited from:
ContextProcessor
lazy val namedAttributes: Boolean

Attributes

Inherited from:
ContextProcessor
val newline: String

Attributes

Inherited from:
ContextProcessor
lazy val sequenceChunkSize: Int

Attributes

Inherited from:
ContextProcessor