本文整理汇总了Java中com.sun.tools.internal.ws.processor.model.ModelException类的典型用法代码示例。如果您正苦于以下问题:Java ModelException类的具体用法?Java ModelException怎么用?Java ModelException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ModelException类属于com.sun.tools.internal.ws.processor.model包,在下文中一共展示了ModelException类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: add
import com.sun.tools.internal.ws.processor.model.ModelException; //导入依赖的package包/类
public void add(JavaStructureMember m) {
if (membersByName.containsKey(m.getName())) {
throw new ModelException("model.uniqueness.javastructuretype",
new Object[] {m.getName(), getRealName()});
}
members.add(m);
membersByName.put(m.getName(), m);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:JavaStructureType.java
示例2: initializeMembersByName
import com.sun.tools.internal.ws.processor.model.ModelException; //导入依赖的package包/类
private void initializeMembersByName() {
membersByName = new HashMap<String, JavaStructureMember>();
if (members != null) {
for (JavaStructureMember m : members) {
if (m.getName() != null &&
membersByName.containsKey(m.getName())) {
throw new ModelException("model.uniqueness");
}
membersByName.put(m.getName(), m);
}
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:JavaStructureType.java
示例3: addMethod
import com.sun.tools.internal.ws.processor.model.ModelException; //导入依赖的package包/类
public void addMethod(JavaMethod method) {
if (hasMethod(method)) {
throw new ModelException("model.uniqueness");
}
methods.add(method);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:JavaInterface.java
示例4: add
import com.sun.tools.internal.ws.processor.model.ModelException; //导入依赖的package包/类
public void add(JAXBElementMember m) {
if (_elementMembersByName.containsKey(m.getName())) {
throw new ModelException("model.uniqueness");
}
_elementMembers.add(m);
if (m.getName() != null) {
_elementMembersByName.put(m.getName().getLocalPart(), m);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:10,代码来源:JAXBStructuredType.java
示例5: setParentType
import com.sun.tools.internal.ws.processor.model.ModelException; //导入依赖的package包/类
public void setParentType(JAXBStructuredType parent) {
if (_parentType != null &&
parent != null &&
!_parentType.equals(parent)) {
throw new ModelException("model.parent.type.already.set",
new Object[] { getName().toString(),
_parentType.getName().toString(),
parent.getName().toString()});
}
this._parentType = parent;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:13,代码来源:JAXBStructuredType.java
示例6: internalBuildJAXBModel
import com.sun.tools.internal.ws.processor.model.ModelException; //导入依赖的package包/类
/**
* Builds model from WSDL document. Model contains abstraction which is used by the
* generators to generate the stub/tie/serializers etc. code.
*
* @see com.sun.tools.internal.ws.processor.modeler.Modeler#buildModel()
*/
private void internalBuildJAXBModel(){
try {
schemaCompiler = options.getSchemaCompiler();
schemaCompiler.resetSchema();
if(options.entityResolver != null) {
//set if its not null so as not to override catalog option specified via xjc args
schemaCompiler.setEntityResolver(options.entityResolver);
}
schemaCompiler.setClassNameAllocator(_classNameAllocator);
schemaCompiler.setErrorListener(errReceiver);
int schemaElementCount = 1;
for (Element element : forest.getInlinedSchemaElement()) {
String location = element.getOwnerDocument().getDocumentURI();
String systemId = location + "#types?schema" + schemaElementCount++;
if(forest.isMexMetadata)
schemaCompiler.parseSchema(systemId,element);
else
new DOMForestScanner(forest).scan(element,schemaCompiler.getParserHandler(systemId));
}
//feed external jaxb:bindings file
InputSource[] externalBindings = options.getSchemaBindings();
if(externalBindings != null){
for(InputSource jaxbBinding : externalBindings){
schemaCompiler.parseSchema(jaxbBinding);
}
}
} catch (Exception e) {
throw new ModelException(e);
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:40,代码来源:JAXBModelBuilder.java
注:本文中的com.sun.tools.internal.ws.processor.model.ModelException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论