Package com.comphenix.protocol.wrappers
Class WrappedDataWatcher.Serializer
java.lang.Object
com.comphenix.protocol.wrappers.AbstractWrapper
com.comphenix.protocol.wrappers.WrappedDataWatcher.Serializer
- Enclosing class:
WrappedDataWatcher
Represents a DataWatcherSerializer in 1.9. If a Serializer is optional,
values must be wrapped in a
Optional.-
Field Summary
Fields inherited from class com.comphenix.protocol.wrappers.AbstractWrapper
handle, handleType -
Constructor Summary
ConstructorsConstructorDescriptionSerializer(Class<?> type, Object handle, boolean optional) Deprecated, for removal: This API element is subject to removal in a future version.Serializer(Type type, Object handle, boolean optional) Constructs a new Serializer -
Method Summary
Modifier and TypeMethodDescriptionGets the type this serializer serializes.Class<?> getType()Deprecated, for removal: This API element is subject to removal in a future version.usegetGenericType()instead.booleanWhether or not this serializer is optional, that is whether or not the return type is wrapped in aOptional.toString()Methods inherited from class com.comphenix.protocol.wrappers.AbstractWrapper
equals, getHandle, getHandleType, hashCode, setHandle
-
Constructor Details
-
Serializer
Deprecated, for removal: This API element is subject to removal in a future version.UseSerializer(Type, Object, boolean)instead.Constructs a new Serializer- Parameters:
type- Type it serializeshandle- NMS handleoptional- Whether or not it'sOptional
-
Serializer
Constructs a new Serializer- Parameters:
type- Type it serializeshandle- NMS handleoptional- Whether or not it'sOptional
-
-
Method Details
-
getType
Deprecated, for removal: This API element is subject to removal in a future version.usegetGenericType()instead.Gets the type this serializer serializes.- Returns:
- The type
-
getGenericType
Gets the type this serializer serializes.- Returns:
- The type.
-
isOptional
public boolean isOptional()Whether or not this serializer is optional, that is whether or not the return type is wrapped in aOptional.- Returns:
- True if it is, false if not
-
toString
- Overrides:
toStringin classAbstractWrapper
-
Serializer(Type, Object, boolean)instead.