Package io.protostuff.runtime
Class RuntimeView.BaseSchema<T>
- java.lang.Object
-
- io.protostuff.runtime.RuntimeView.BaseSchema<T>
-
- All Implemented Interfaces:
Schema<T>
- Direct Known Subclasses:
RuntimeView.PostFilteredSchema
- Enclosing class:
- RuntimeView
public abstract static class RuntimeView.BaseSchema<T> extends java.lang.Object implements Schema<T>
The base schema used by the built-in factories.
-
-
Field Summary
Fields Modifier and Type Field Description RuntimeEnv.Instantiator<T>instantiatorjava.lang.Class<? super T>typeClass
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseSchema(java.lang.Class<? super T> typeClass, RuntimeEnv.Instantiator<T> instantiator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisInitialized(T message)Returns true if there is no required field or if all the required fields are set.java.lang.StringmessageFullName()Returns the full name of the message tied to this schema.java.lang.StringmessageName()Returns the simple name of the message tied to this schema.TnewMessage()Creates the message/object tied to this schema.java.lang.Class<? super T>typeClass()Gets the class of the message.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.protostuff.Schema
getFieldName, getFieldNumber, mergeFrom, writeTo
-
-
-
-
Field Detail
-
typeClass
public final java.lang.Class<? super T> typeClass
-
instantiator
public final RuntimeEnv.Instantiator<T> instantiator
-
-
Constructor Detail
-
BaseSchema
protected BaseSchema(java.lang.Class<? super T> typeClass, RuntimeEnv.Instantiator<T> instantiator)
-
-
Method Detail
-
typeClass
public java.lang.Class<? super T> typeClass()
Description copied from interface:SchemaGets the class of the message.
-
messageName
public java.lang.String messageName()
Description copied from interface:SchemaReturns the simple name of the message tied to this schema. Allows custom schemas to provide a custom name other than typeClass().getSimpleName();- Specified by:
messageNamein interfaceSchema<T>
-
messageFullName
public java.lang.String messageFullName()
Description copied from interface:SchemaReturns the full name of the message tied to this schema. Allows custom schemas to provide a custom name other than typeClass().getName();- Specified by:
messageFullNamein interfaceSchema<T>
-
isInitialized
public boolean isInitialized(T message)
Description copied from interface:SchemaReturns true if there is no required field or if all the required fields are set.- Specified by:
isInitializedin interfaceSchema<T>
-
newMessage
public T newMessage()
Description copied from interface:SchemaCreates the message/object tied to this schema.- Specified by:
newMessagein interfaceSchema<T>
-
-