NamedType

grackle.NamedType
sealed trait NamedType extends Type

A type with a schema-defined name.

This includes object types, inferface types and enums.

Attributes

Source
schema.scala
Graph
Supertypes
trait Type
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
class EnumType
class ScalarType
class TypeRef
class ObjectType
class UnionType
Show all

Members list

Value members

Abstract methods

def description: Option[String]

Attributes

Source
schema.scala
def directives: List[Directive]

Attributes

Source
schema.scala
def name: String

The name of this type

The name of this type

Attributes

Source
schema.scala

Concrete methods

override def asNamed: Option[NamedType]

Attributes

Definition Classes
Source
schema.scala
override def dealias: NamedType

Strip off aliases

Strip off aliases

Attributes

Definition Classes
Source
schema.scala
override def isNamed: Boolean

Attributes

Definition Classes
Source
schema.scala
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
Source
schema.scala

Inherited methods

def /(pathElement: String): Path

Attributes

Inherited from:
Type
Source
schema.scala
def <:<(other: Type): Boolean

true if this type is a subtype of other.

true if this type is a subtype of other.

Attributes

Inherited from:
Type
Source
schema.scala
def =:=(other: Type): Boolean

Is this type equivalent to other.

Is this type equivalent to other.

Note that plain == will distinguish types from type aliases, which is typically not desirable, so =:= is usually the most appropriate comparison operator.

Attributes

Inherited from:
Type
Source
schema.scala
def asLeaf: Option[Type]

If the underlying type of this type is a scalar or an enum then yield it otherwise yield None.

If the underlying type of this type is a scalar or an enum then yield it otherwise yield None.

Attributes

Inherited from:
Type
Source
schema.scala
def canEqual(that: Any): Boolean

Attributes

Inherited from:
Equals
def exists: Boolean

true if a non-TypeRef or a TypeRef to a defined type

true if a non-TypeRef or a TypeRef to a defined type

Attributes

Inherited from:
Type
Source
schema.scala
def field(fieldName: String): Option[Type]

Yield the type of the field of this type named fieldName or None if there is no such field.

Yield the type of the field of this type named fieldName or None if there is no such field.

Attributes

Inherited from:
Type
Source
schema.scala
def fieldInfo(fieldName: String): Option[Field]

Yields the definition of fieldName in this type if it exists, None otherwise.

Yields the definition of fieldName in this type if it exists, None otherwise.

Attributes

Inherited from:
Type
Source
schema.scala
def hasField(fieldName: String): Boolean

true if this type has a field named fieldName, false otherwise.

true if this type has a field named fieldName, false otherwise.

Attributes

Inherited from:
Type
Source
schema.scala
def isInterface: Boolean

Attributes

Inherited from:
Type
Source
schema.scala
def isLeaf: Boolean

Is this type a leaf type?

Is this type a leaf type?

true if after stripping of aliases the underlying type a scalar or an enum, false otherwise.

Attributes

Inherited from:
Type
Source
schema.scala
def isList: Boolean

Is this type a list.

Is this type a list.

Attributes

Inherited from:
Type
Source
schema.scala
def isNullable: Boolean

Is this type nullable?

Is this type nullable?

Attributes

Inherited from:
Type
Source
schema.scala
def isUnderlyingLeaf: Boolean

Is the underlying of this type a leaf type?

Is the underlying of this type a leaf type?

Strip off all aliases, nullability and enclosing list types until an underlying leaf type is reached, in which case yield true, or an a object, interface or union type which is reached, in which case yield false.

Attributes

Inherited from:
Type
Source
schema.scala
def isUnion: Boolean

Attributes

Inherited from:
Type
Source
schema.scala
def item: Option[Type]

The element type of this type.

The element type of this type.

If this type is is a list, yield the non-list underlying type. Otherwise yield None.

Attributes

Inherited from:
Type
Source
schema.scala
def list: Type

This type if it is a (nullable) list, ListType(this) otherwise.

This type if it is a (nullable) list, ListType(this) otherwise.

Attributes

Inherited from:
Type
Source
schema.scala
def nominal_=:=(other: Type): Boolean

Attributes

Inherited from:
Type
Source
schema.scala
def nonNull: Type

A non-nullable version of this type.

A non-nullable version of this type.

If this type is nullable, yield the non-nullable underlying type. Otherwise yield this type.

Attributes

Inherited from:
Type
Source
schema.scala
def nullable: Type

This type if it is nullable, Nullable(this) otherwise.

This type if it is nullable, Nullable(this) otherwise.

Attributes

Inherited from:
Type
Source
schema.scala
def path(fns: List[String]): Option[Type]

Yield the type of the field at the end of the path fns starting from this type, or None if there is no such field.

Yield the type of the field at the end of the path fns starting from this type, or None if there is no such field.

Attributes

Inherited from:
Type
Source
schema.scala
def pathIsList(fns: List[String]): Boolean

Does the path fns from this type specify multiple values.

Does the path fns from this type specify multiple values.

true if navigating through the path fns from this type might specify 0 or more values. This will be the case if the path passes through at least one field of a List type.

Attributes

Inherited from:
Type
Source
schema.scala
def pathIsNullable(fns: List[String]): Boolean

Does the path fns from this type specify a nullable type.

Does the path fns from this type specify a nullable type.

true if navigating through the path fns from this type might specify an optional value. This will be the case if the path passes through at least one field of a nullable type.

Attributes

Inherited from:
Type
Source
schema.scala
def productArity: Int

Attributes

Inherited from:
Product
def productElement(n: Int): Any

Attributes

Inherited from:
Product
def productElementName(n: Int): String

Attributes

Inherited from:
Product
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def productPrefix: String

Attributes

Inherited from:
Product

Attributes

Inherited from:
Type
Source
schema.scala
def underlyingField(fieldName: String): Option[Type]

Yield the type of the field named fieldName of the object type underlying this type.

Yield the type of the field named fieldName of the object type underlying this type.

Strip off all aliases, nullability and enclosing list types until an underlying object type is reached which has a field named fieldName, in which case yield the type of that field; if there is no such field, yields None.

Attributes

Inherited from:
Type
Source
schema.scala
def underlyingLeaf: Option[Type]

Yield the leaf type underlying this type.

Yield the leaf type underlying this type.

Strip off all aliases, nullability and enclosing list types until an underlying leaf type is reached, in which case yield it, or an a object, interface or union type which is reached, in which case yield None.

Attributes

Inherited from:
Type
Source
schema.scala

Yield the named type underlying this type.

Yield the named type underlying this type.

Strips of nullability and enclosing list types until an underlying named type is reached. This method will always yield a named type.

Attributes

Inherited from:
Type
Source
schema.scala

Yield the object type underlying this type.

Yield the object type underlying this type.

Strip off all aliases, nullability and enclosing list types until an underlying object type is reached, in which case yield it, or a non-object type which isn't further reducible is reached, in which case yield None.

Attributes

Inherited from:
Type
Source
schema.scala
def variantField(fieldName: String): Boolean

true if this type has a field named fieldName which is undefined in some interface it implements

true if this type has a field named fieldName which is undefined in some interface it implements

Attributes

Inherited from:
Type
Source
schema.scala

Attributes

Inherited from:
Type
Source
schema.scala