Skip to content

Package io.github.qishr.cascara.common.lang.type

Interface TypeDescriptor

java.lang.Object
        io.github.qishr.cascara.common.lang.type.TypeDescriptor

All Implemented Interfaces:
    ServiceProvider

All Known Implementing Classes:
    ScalarDescriptor, AbstractTypeDescriptor, TypeSerializer


public interface TypeDescriptor

Method Summary

Modifier and Type Method Description
public abstract Class getJvmType() Returns the JVM type handled by this TypeDescriptor.
public abstract String getSchemaType() Returns the JSON Schema type handled by this TypeDescriptor.
public abstract void populateSchema(MapAstNode schema) Adds JSON Schema keywords and values to a map representing a JSON schema for the JSON type handled by this TypeDescriptor.
public abstract boolean validate(String text, Reporter collector)

Method Details

getJvmType

public abstract Class getJvmType()

Returns the JVM type handled by this TypeDescriptor.


getSchemaType

public abstract String getSchemaType()

Returns the JSON Schema type handled by this TypeDescriptor.


populateSchema

public abstract void populateSchema(MapAstNode schema)

Adds JSON Schema keywords and values to a map representing a JSON schema for the JSON type handled by this TypeDescriptor.


validate

public abstract boolean validate(String text, Reporter collector)