T - Tpublic abstract class ItemType<T extends ItemType> extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
protected Item |
_newItem(Object newItemValue) |
protected abstract void |
addSubitemImpl(Item item,
Object subitemValue) |
static ItemType |
BCD_DATE(String name)
BCD3字节,只有日期:年月日
|
static ItemType |
BCD_DATETIME(String name)
BCD6字节,含日期和时间:年月日时分秒
|
static NumberItemType |
BCD(int bytes,
String name)
限制:8字节以内
|
static NumberItemType |
BIN(int byteCount,
String name) |
static NumberItemType |
BITS(int bitCnt,
String name) |
static ItemType |
BYTES_ASC(int bytes,
String name)
定长字符串
|
static ItemType |
BYTES(int bytes,
String name)
字节块
|
abstract Item |
create() |
int |
dbParamCount() |
static NumberItemType |
DEC(int byteCount,
String name) |
String |
description() |
T |
description(String describe)
为来可提取的注释信息。
|
List<? extends ItemType> |
flatItemTypes() |
String |
formatFlatObjects(Item item) |
protected abstract Item |
getSubitemImpl(Item item,
int key) |
static NumberItemType |
HEX(int byteCount,
String name) |
protected abstract Class |
insideValueClass() |
protected Object |
itemValue(Item item) |
static ItemType |
LIST_H4(String name,
ItemType... ItemTypeGroup)
含4字节头部的列表
|
static ItemType |
LIST(String name,
ItemType... ItemTypeGroup)
列表(头部的1字节)
|
abstract Item |
load(BytesLoader in) |
Item |
load(Iterator<Object> in) |
Item |
load(Object first,
Object... objects) |
abstract Item |
load(Scanner in)
允许从字符串载入数据(为数据库载入准备)
|
boolean |
match(Item item) |
String |
name() |
static NumberItemType |
NUM(int byteCount,
String name) |
static ItemType |
REMAIN_BYTES(String name)
剩余字节块
|
protected void |
safeSetItemValue(Item item,
Object value) |
protected void |
setSubitemImpl(Item item,
int key,
Object newValue) |
static FlagSignedNumberItemType |
SNUM(int byteCnt,
String name)
有符号(可能出现负数)数
|
int |
statementParamImpl(Item item,
CallableStatement statement,
int pos) |
static StringWithLengthItemType |
STR(int byteCount,
String name) |
static ItemType |
STRUCT(String name,
ItemType... ItemTypeGroup) |
void |
toBytes(Item item,
BytesBuilder build) |
abstract void |
toBytes(Object itemValue,
BytesBuilder build) |
double |
toDoubleImpl(Item item) |
void |
toFlatObject(Object itemValue,
cn.gongler.util.protocol.itemtype.IteratorBuilder<Object> build) |
String |
toString() |
String |
toString(Item item) |
String |
toString(Object itemValue) |
static NumberItemType |
包类型(int cmdType,
String name) |
public static final ItemType CSTR
protected ItemType(String name)
public static NumberItemType 包类型(int cmdType, String name)
public static NumberItemType NUM(int byteCount, String name)
public static NumberItemType DEC(int byteCount, String name)
public static NumberItemType HEX(int byteCount, String name)
public static NumberItemType BIN(int byteCount, String name)
public static NumberItemType BITS(int bitCnt, String name)
public static StringWithLengthItemType STR(int byteCount, String name)
public static FlagSignedNumberItemType SNUM(int byteCnt, String name)
byteCnt - 字节数name - item type namepublic static ItemType BYTES(int bytes, String name)
bytes - byte countname - namepublic static ItemType BYTES_ASC(int bytes, String name)
bytes - byte countname - namepublic static ItemType LIST(String name, ItemType... ItemTypeGroup)
name - nameItemTypeGroup - subitemTypespublic static ItemType LIST_H4(String name, ItemType... ItemTypeGroup)
name - nameItemTypeGroup - subitemTypespublic static NumberItemType BCD(int bytes, String name)
bytes - byte countname - namepublic static ItemType BCD_DATETIME(String name)
name - namepublic String name()
public String description()
public boolean match(Item item)
item - itempublic abstract Item load(BytesLoader in)
in - loaderpublic abstract void toBytes(Object itemValue, BytesBuilder build)
itemValue - itemValuebuild - builderpublic final void toBytes(Item item, BytesBuilder build)
public abstract Item create()
protected abstract Class insideValueClass()
public int dbParamCount()
public int statementParamImpl(Item item, CallableStatement statement, int pos) throws SQLException
SQLExceptionpublic void toFlatObject(Object itemValue, cn.gongler.util.protocol.itemtype.IteratorBuilder<Object> build)
public double toDoubleImpl(Item item)
Copyright © 2022. All rights reserved.