本文整理了Java中io.protostuff.Schema.messageFullName()
方法的一些代码示例,展示了Schema.messageFullName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Schema.messageFullName()
方法的具体详情如下:
包路径:io.protostuff.Schema
类名称:Schema
方法名:messageFullName
[英]Returns the full name of the message tied to this schema. Allows custom schemas to provide a custom name other than typeClass().getName();
[中]返回绑定到此架构的消息的全名。允许自定义架构提供除typeClass()之外的自定义名称。getName();
代码示例来源:origin: protostuff/protostuff
@Override
public String messageFullName()
{
return schema.messageFullName();
}
代码示例来源:origin: protostuff/protostuff
@Override
public String messageFullName()
{
return wrappedSchema.messageFullName();
}
代码示例来源:origin: protostuff/protostuff
@Override
protected Input begin(Pipe.Schema<?> pipeSchema) throws IOException
{
if (parser.nextToken() != JsonToken.START_OBJECT)
{
throw new JsonInputException("Expected token: { but was " +
parser.getCurrentToken() + " on message " +
pipeSchema.wrappedSchema.messageFullName());
}
return jsonInput;
}
代码示例来源:origin: protostuff/protostuff
/**
* Merges the {@code message} from the JsonParser using the given {@code schema}.
*/
public static <T> void mergeFrom(JsonParser parser, T message, Schema<T> schema,
boolean numeric) throws IOException
{
if (parser.nextToken() != JsonToken.START_OBJECT)
{
throw new JsonInputException("Expected token: { but was " +
parser.getCurrentToken() + " on message " +
schema.messageFullName());
}
schema.mergeFrom(new JsonInput(parser, numeric), message);
if (parser.getCurrentToken() != JsonToken.END_OBJECT)
{
throw new JsonInputException("Expected token: } but was " +
parser.getCurrentToken() + " on message " +
schema.messageFullName());
}
}
代码示例来源:origin: protostuff/protostuff
@Override
public <T> void handleUnknownField(int fieldNumber, Schema<T> schema) throws IOException
{
final String name = parser.getLocalName();
while (true)
{
switch (next())
{
case END_ELEMENT:
if (name.equals(parser.getLocalName()))
{
// we can skip this unknown scalar field.
nextTag();
return;
}
throw new XmlInputException("Unknown field: " + name + " on message " +
schema.messageFullName());
case END_DOCUMENT:
// malformed xml.
case START_ELEMENT:
// message field
// we do not know how deep this message is
throw new XmlInputException("Unknown field: " + name + " on message " +
schema.messageFullName());
}
}
}
代码示例来源:origin: protostuff/protostuff
schema.messageFullName());
schema.messageFullName());
schema.messageFullName());
代码示例来源:origin: protostuff/protostuff
parser.getCurrentToken() + " on message " + schema.messageFullName());
代码示例来源:origin: protostuff/protostuff
@Override
protected void end(Pipe.Schema<?> pipeSchema, Input input,
boolean cleanupOnly) throws IOException
{
if (cleanupOnly)
{
parser.close();
return;
}
assert input == jsonInput;
final JsonToken token = parser.getCurrentToken();
parser.close();
if (token != JsonToken.END_OBJECT)
{
throw new JsonInputException("Expected token: } but was " +
token + " on message " +
pipeSchema.wrappedSchema.messageFullName());
}
}
};
代码示例来源:origin: protostuff/protostuff
schema.messageFullName());
schema.messageFullName());
代码示例来源:origin: protostuff/protostuff
schema.messageFullName());
case END_DOCUMENT:
schema.messageFullName());
代码示例来源:origin: io.protostuff/protostuff-json
@Override
protected Input begin(Pipe.Schema<?> pipeSchema) throws IOException
{
if (parser.nextToken() != JsonToken.START_OBJECT)
{
throw new JsonInputException("Expected token: { but was " +
parser.getCurrentToken() + " on message " +
pipeSchema.wrappedSchema.messageFullName());
}
return jsonInput;
}
代码示例来源:origin: io.protostuff/protostuff-json
/**
* Merges the {@code message} from the JsonParser using the given {@code schema}.
*/
public static <T> void mergeFrom(JsonParser parser, T message, Schema<T> schema,
boolean numeric) throws IOException
{
if (parser.nextToken() != JsonToken.START_OBJECT)
{
throw new JsonInputException("Expected token: { but was " +
parser.getCurrentToken() + " on message " +
schema.messageFullName());
}
schema.mergeFrom(new JsonInput(parser, numeric), message);
if (parser.getCurrentToken() != JsonToken.END_OBJECT)
{
throw new JsonInputException("Expected token: } but was " +
parser.getCurrentToken() + " on message " +
schema.messageFullName());
}
}
代码示例来源:origin: io.protostuff/protostuff-json
schema.messageFullName());
schema.messageFullName());
schema.messageFullName());
代码示例来源:origin: io.protostuff/protostuff-json
parser.getCurrentToken() + " on message " + schema.messageFullName());
代码示例来源:origin: io.protostuff/protostuff-json
@Override
protected void end(Pipe.Schema<?> pipeSchema, Input input,
boolean cleanupOnly) throws IOException
{
if (cleanupOnly)
{
parser.close();
return;
}
assert input == jsonInput;
final JsonToken token = parser.getCurrentToken();
parser.close();
if (token != JsonToken.END_OBJECT)
{
throw new JsonInputException("Expected token: } but was " +
token + " on message " +
pipeSchema.wrappedSchema.messageFullName());
}
}
};
代码示例来源:origin: io.protostuff/protostuff-json
schema.messageFullName());
schema.messageFullName());
内容来源于网络,如有侵权,请联系作者删除!