com.hazelcast.nio.serialization
Interface ClassDefinition
- All Known Implementing Classes:
- BinaryClassDefinitionProxy
public interface ClassDefinition
ClassDefinition defines a class schema for Portable classes. It allows to query field names, types, class id etc.
It can be created manually using ClassDefinitionBuilder
or ondemand during serialization phase.
- See Also:
Portable
,
ClassDefinitionBuilder
getField
FieldDefinition getField(String name)
- Parameters:
name
- name of the field
- Returns:
- field definition by given name or null
getField
FieldDefinition getField(int fieldIndex)
- Parameters:
fieldIndex
- index of the field
- Returns:
- field definition by given index
- Throws:
IndexOutOfBoundsException
hasField
boolean hasField(String fieldName)
- Parameters:
fieldName
- field name
- Returns:
- true if this class definition contains a field named by given name
getFieldNames
Set<String> getFieldNames()
- Returns:
- all field names contained in this class definition
getFieldType
FieldType getFieldType(String fieldName)
- Parameters:
fieldName
- name of the field
- Returns:
- type of given field
- Throws:
IllegalArgumentException
getFieldClassId
int getFieldClassId(String fieldName)
- Parameters:
fieldName
- name of the field
- Returns:
- class id of given field
- Throws:
IllegalArgumentException
getFieldCount
int getFieldCount()
- Returns:
- total field count
getFactoryId
int getFactoryId()
- Returns:
- factory id
getClassId
int getClassId()
- Returns:
- class id
getVersion
int getVersion()
- Returns:
- version
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.