public interface ClassDefinition
Portable
classes. It allows querying of field names, types, class IDs etc.
It can be created manually using ClassDefinitionBuilder
or on demand during deserialization.Portable
,
ClassDefinitionBuilder
Modifier and Type | Method and Description |
---|---|
int |
getClassId()
Returns the class ID.
|
int |
getFactoryId()
Returns the factory ID.
|
FieldDefinition |
getField(int fieldIndex)
Gets the FieldDefinition for a given fieldIndex.
|
FieldDefinition |
getField(String name)
Gets the FieldDefinition for a particular field.
|
int |
getFieldClassId(String fieldName)
Gets the class ID of a field.
|
int |
getFieldCount()
Returns the field count.
|
Set<String> |
getFieldNames()
Returns a Set of all field names.
|
FieldType |
getFieldType(String fieldName)
Get the FieldType for a given fieldName.
|
int |
getVersion()
Returns the version.
|
boolean |
hasField(String fieldName)
Checks if there exists a FieldDefinition with the given fieldName.
|
FieldDefinition getField(String name)
name
- name of the fieldFieldDefinition getField(int fieldIndex)
fieldIndex
- index of the fieldIndexOutOfBoundsException
- if the fieldIndex is invalid.boolean hasField(String fieldName)
fieldName
- field nameSet<String> getFieldNames()
FieldType getFieldType(String fieldName)
fieldName
- name of the fieldIllegalArgumentException
- if the field does not exist.int getFieldClassId(String fieldName)
fieldName
- name of the fieldIllegalArgumentException
- if the field does not not existint getFieldCount()
int getFactoryId()
int getClassId()
int getVersion()
Copyright © 2024 Hazelcast, Inc.. All rights reserved.