- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中uk.co.real_logic.sbe.xml.XmlSchemaParser.checkForValidName()
方法的一些代码示例,展示了XmlSchemaParser.checkForValidName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XmlSchemaParser.checkForValidName()
方法的具体详情如下:
包路径:uk.co.real_logic.sbe.xml.XmlSchemaParser
类名称:XmlSchemaParser
方法名:checkForValidName
[英]Check name against validity for C++ and Java naming. Warning if not valid.
[中]检查名称与C++和java命名的有效性。警告如果无效。
代码示例来源:origin: real-logic/simple-binary-encoding
/**
* Construct a ValidValue given the XML node and the encodingType.
*
* @param node that contains the validValue
* @param encodingType for the enum
*/
public ValidValue(final Node node, final PrimitiveType encodingType)
{
name = getAttributeValue(node, "name");
description = getAttributeValueOrNull(node, "description");
value = PrimitiveValue.parse(node.getFirstChild().getNodeValue(), encodingType);
sinceVersion = Integer.parseInt(getAttributeValue(node, "sinceVersion", "0"));
deprecated = Integer.parseInt(getAttributeValue(node, "deprecated", "0"));
checkForValidName(node, name);
}
代码示例来源:origin: real-logic/simple-binary-encoding
private static void addTypeWithNameCheck(final Map<String, Type> typeByNameMap, final Type type, final Node node)
{
if (typeByNameMap.get(type.name()) != null)
{
handleWarning(node, "type already exists for name: " + type.name());
}
checkForValidName(node, type.name());
typeByNameMap.put(type.name(), type);
}
代码示例来源:origin: real-logic/simple-binary-encoding
/**
* Construct a Choice given the XML node and the encodingType
*
* @param node that contains the validValue
* @param encodingType for the enum
*/
public Choice(final Node node, final PrimitiveType encodingType)
{
name = getAttributeValue(node, "name");
description = getAttributeValueOrNull(node, "description");
value = PrimitiveValue.parse(node.getFirstChild().getNodeValue(), encodingType);
sinceVersion = Integer.parseInt(getAttributeValue(node, "sinceVersion", "0"));
deprecated = Integer.parseInt(getAttributeValue(node, "deprecated", "0"));
// choice values are bit positions (0, 1, 2, 3, 4, etc.) from LSB to MSB
if (value.longValue() >= (encodingType.size() * 8))
{
throw new IllegalArgumentException("Choice value out of bounds: " + value.longValue());
}
checkForValidName(node, name);
}
代码示例来源:origin: real-logic/simple-binary-encoding
private static void addMessageWithIdCheck(
final ObjectHashSet<String> distinctNames,
final Map<Long, Message> messageByIdMap,
final Message message,
final Node node)
{
if (messageByIdMap.get((long)message.id()) != null)
{
handleError(node, "message template id already exists: " + message.id());
}
if (!distinctNames.add(message.name()))
{
handleError(node, "message name already exists: " + message.name());
}
checkForValidName(node, message.name());
messageByIdMap.put((long)message.id(), message);
}
代码示例来源:origin: real-logic/simple-binary-encoding
checkForValidName(node, name);
代码示例来源:origin: real-logic/simple-binary-encoding
.build();
XmlSchemaParser.checkForValidName(node, field.name());
代码示例来源:origin: uk.co.real-logic/sbe
public void validate(final Node node)
{
if (type != null)
{
if (semanticType != null && type.semanticType() != null && !semanticType.equals(type.semanticType()))
{
handleError(node, "Mismatched semanticType on type and field: " + name);
}
}
checkForValidName(node, name);
}
代码示例来源:origin: uk.co.real-logic/sbe
private static void addMessageWithIdCheck(
final Map<Long, Message> messageByIdMap, final Message message, final Node node)
{
if (messageByIdMap.get(Long.valueOf(message.id())) != null)
{
handleError(node, "message template id already exists: " + message.id());
}
checkForValidName(node, message.name());
messageByIdMap.put(Long.valueOf(message.id()), message);
}
代码示例来源:origin: uk.co.real-logic/sbe
/**
* Construct a ValidValue given the XML node and the encodingType.
*
* @param node that contains the validValue
* @param encodingType for the enum
*/
public ValidValue(final Node node, final PrimitiveType encodingType)
{
name = getAttributeValue(node, "name");
description = getAttributeValueOrNull(node, "description");
value = PrimitiveValue.parse(node.getFirstChild().getNodeValue(), encodingType);
sinceVersion = Integer.parseInt(getAttributeValue(node, "sinceVersion", "0"));
checkForValidName(node, name);
}
代码示例来源:origin: uk.co.real-logic/sbe-tool
private static void addTypeWithNameCheck(final Map<String, Type> typeByNameMap, final Type type, final Node node)
{
if (typeByNameMap.get(type.name()) != null)
{
handleWarning(node, "type already exists for name: " + type.name());
}
checkForValidName(node, type.name());
typeByNameMap.put(type.name(), type);
}
代码示例来源:origin: uk.co.real-logic/sbe-tool
/**
* Construct a ValidValue given the XML node and the encodingType.
*
* @param node that contains the validValue
* @param encodingType for the enum
*/
public ValidValue(final Node node, final PrimitiveType encodingType)
{
name = getAttributeValue(node, "name");
description = getAttributeValueOrNull(node, "description");
value = PrimitiveValue.parse(node.getFirstChild().getNodeValue(), encodingType);
sinceVersion = Integer.parseInt(getAttributeValue(node, "sinceVersion", "0"));
deprecated = Integer.parseInt(getAttributeValue(node, "deprecated", "0"));
checkForValidName(node, name);
}
代码示例来源:origin: uk.co.real-logic/sbe-all
/**
* Construct a ValidValue given the XML node and the encodingType.
*
* @param node that contains the validValue
* @param encodingType for the enum
*/
public ValidValue(final Node node, final PrimitiveType encodingType)
{
name = getAttributeValue(node, "name");
description = getAttributeValueOrNull(node, "description");
value = PrimitiveValue.parse(node.getFirstChild().getNodeValue(), encodingType);
sinceVersion = Integer.parseInt(getAttributeValue(node, "sinceVersion", "0"));
deprecated = Integer.parseInt(getAttributeValue(node, "deprecated", "0"));
checkForValidName(node, name);
}
代码示例来源:origin: uk.co.real-logic/sbe-all
private static void addTypeWithNameCheck(final Map<String, Type> typeByNameMap, final Type type, final Node node)
{
if (typeByNameMap.get(type.name()) != null)
{
handleWarning(node, "type already exists for name: " + type.name());
}
checkForValidName(node, type.name());
typeByNameMap.put(type.name(), type);
}
代码示例来源:origin: uk.co.real-logic/sbe
private static void addTypeWithNameCheck(final Map<String, Type> typeByNameMap, final Type type, final Node node)
{
if (typeByNameMap.get(type.name()) != null)
{
handleWarning(node, "type already exists for name: " + type.name());
}
checkForValidName(node, type.name());
typeByNameMap.put(type.name(), type);
}
代码示例来源:origin: uk.co.real-logic/sbe-all
/**
* Construct a Choice given the XML node and the encodingType
*
* @param node that contains the validValue
* @param encodingType for the enum
*/
public Choice(final Node node, final PrimitiveType encodingType)
{
name = getAttributeValue(node, "name");
description = getAttributeValueOrNull(node, "description");
value = PrimitiveValue.parse(node.getFirstChild().getNodeValue(), encodingType);
sinceVersion = Integer.parseInt(getAttributeValue(node, "sinceVersion", "0"));
deprecated = Integer.parseInt(getAttributeValue(node, "deprecated", "0"));
// choice values are bit positions (0, 1, 2, 3, 4, etc.) from LSB to MSB
if (value.longValue() >= (encodingType.size() * 8))
{
throw new IllegalArgumentException("Choice value out of bounds: " + value.longValue());
}
checkForValidName(node, name);
}
代码示例来源:origin: uk.co.real-logic/sbe
/**
* Construct a Choice given the XML node and the encodingType
*
* @param node that contains the validValue
* @param encodingType for the enum
*/
public Choice(final Node node, final PrimitiveType encodingType)
{
name = getAttributeValue(node, "name");
description = getAttributeValueOrNull(node, "description");
value = PrimitiveValue.parse(node.getFirstChild().getNodeValue(), encodingType);
sinceVersion = Integer.parseInt(getAttributeValue(node, "sinceVersion", "0"));
// choice values are bit positions (0, 1, 2, 3, 4, etc.) from LSB to MSB
if (value.longValue() >= (encodingType.size() * 8))
{
throw new IllegalArgumentException("Choice value out of bounds: " + value.longValue());
}
checkForValidName(node, name);
}
代码示例来源:origin: uk.co.real-logic/sbe-tool
/**
* Construct a Choice given the XML node and the encodingType
*
* @param node that contains the validValue
* @param encodingType for the enum
*/
public Choice(final Node node, final PrimitiveType encodingType)
{
name = getAttributeValue(node, "name");
description = getAttributeValueOrNull(node, "description");
value = PrimitiveValue.parse(node.getFirstChild().getNodeValue(), encodingType);
sinceVersion = Integer.parseInt(getAttributeValue(node, "sinceVersion", "0"));
deprecated = Integer.parseInt(getAttributeValue(node, "deprecated", "0"));
// choice values are bit positions (0, 1, 2, 3, 4, etc.) from LSB to MSB
if (value.longValue() >= (encodingType.size() * 8))
{
throw new IllegalArgumentException("Choice value out of bounds: " + value.longValue());
}
checkForValidName(node, name);
}
代码示例来源:origin: uk.co.real-logic/sbe
private Field parseGroupField(final NodeList nodeList, final int nodeIndex) throws XPathExpressionException
{
final String dimensionTypeName = getAttributeValue(nodeList.item(nodeIndex), "dimensionType", "groupSizeEncoding");
Type dimensionType = typeByNameMap.get(dimensionTypeName);
if (dimensionType == null)
{
handleError(nodeList.item(nodeIndex), "could not find dimensionType: " + dimensionTypeName);
}
else if (!(dimensionType instanceof CompositeType))
{
handleError(nodeList.item(nodeIndex), "dimensionType should be a composite type: " + dimensionTypeName);
dimensionType = null;
}
else
{
((CompositeType)dimensionType).checkForWellFormedGroupSizeEncoding(nodeList.item(nodeIndex));
}
final Field field = new Field.Builder()
.name(getAttributeValue(nodeList.item(nodeIndex), "name"))
.description(getAttributeValueOrNull(nodeList.item(nodeIndex), "description"))
.id(Integer.parseInt(getAttributeValue(nodeList.item(nodeIndex), "id")))
.blockLength(Integer.parseInt(getAttributeValue(nodeList.item(nodeIndex), "blockLength", "0")))
.sinceVersion(Integer.parseInt(getAttributeValue(nodeList.item(nodeIndex), "sinceVersion", "0")))
.dimensionType((CompositeType)dimensionType)
.build();
XmlSchemaParser.checkForValidName(nodeList.item(nodeIndex), field.name());
field.groupFields(parseFieldsAndGroups(nodeList.item(nodeIndex))); // recursive call
return field;
}
代码示例来源:origin: uk.co.real-logic/sbe-all
private static void addMessageWithIdCheck(
final ObjectHashSet<String> distinctNames,
final Map<Long, Message> messageByIdMap,
final Message message,
final Node node)
{
if (messageByIdMap.get((long)message.id()) != null)
{
handleError(node, "message template id already exists: " + message.id());
}
if (!distinctNames.add(message.name()))
{
handleError(node, "message name already exists: " + message.name());
}
checkForValidName(node, message.name());
messageByIdMap.put((long)message.id(), message);
}
代码示例来源:origin: uk.co.real-logic/sbe-tool
private static void addMessageWithIdCheck(
final ObjectHashSet<String> distinctNames,
final Map<Long, Message> messageByIdMap,
final Message message,
final Node node)
{
if (messageByIdMap.get((long)message.id()) != null)
{
handleError(node, "message template id already exists: " + message.id());
}
if (!distinctNames.add(message.name()))
{
handleError(node, "message name already exists: " + message.name());
}
checkForValidName(node, message.name());
messageByIdMap.put((long)message.id(), message);
}
本文整理了Java中uk.co.real_logic.sbe.xml.XmlSchemaParser类的一些代码示例,展示了XmlSchemaParser类的具体用法。这些代码示例主要来源于Githu
本文整理了Java中uk.co.real_logic.sbe.xml.XmlSchemaParser.validate()方法的一些代码示例,展示了XmlSchemaParser.validate()
本文整理了Java中uk.co.real_logic.sbe.xml.XmlSchemaParser.addTypeWithNameCheck()方法的一些代码示例,展示了XmlSchemaParse
本文整理了Java中uk.co.real_logic.sbe.xml.XmlSchemaParser.addMessageWithIdCheck()方法的一些代码示例,展示了XmlSchemaPars
本文整理了Java中uk.co.real_logic.sbe.xml.XmlSchemaParser.formatLocationInfo()方法的一些代码示例,展示了XmlSchemaParser.
本文整理了Java中uk.co.real_logic.sbe.xml.XmlSchemaParser.handleWarning()方法的一些代码示例,展示了XmlSchemaParser.handl
本文整理了Java中uk.co.real_logic.sbe.xml.XmlSchemaParser.forEach()方法的一些代码示例,展示了XmlSchemaParser.forEach()的具
本文整理了Java中uk.co.real_logic.sbe.xml.XmlSchemaParser.findTypes()方法的一些代码示例,展示了XmlSchemaParser.findTypes
本文整理了Java中uk.co.real_logic.sbe.xml.XmlSchemaParser.checkForValidName()方法的一些代码示例,展示了XmlSchemaParser.c
本文整理了Java中uk.co.real_logic.sbe.xml.XmlSchemaParser.getAttributeValue()方法的一些代码示例,展示了XmlSchemaParser.g
本文整理了Java中uk.co.real_logic.sbe.xml.XmlSchemaParser.getAttributeValueOrNull()方法的一些代码示例,展示了XmlSchemaPa
本文整理了Java中uk.co.real_logic.sbe.xml.XmlSchemaParser.getByteOrder()方法的一些代码示例,展示了XmlSchemaParser.getByt
本文整理了Java中uk.co.real_logic.sbe.xml.XmlSchemaParser.findMessages()方法的一些代码示例,展示了XmlSchemaParser.findMe
本文整理了Java中uk.co.real_logic.sbe.xml.XmlSchemaParser.parse()方法的一些代码示例,展示了XmlSchemaParser.parse()的具体用法。
本文整理了Java中uk.co.real_logic.sbe.xml.XmlSchemaParser.handleError()方法的一些代码示例,展示了XmlSchemaParser.handleE
我是一名优秀的程序员,十分优秀!