本文整理汇总了Java中com.sun.xml.internal.bind.v2.model.core.ID.NONE属性的典型用法代码示例。如果您正苦于以下问题:Java ID.NONE属性的具体用法?Java ID.NONE怎么用?Java ID.NONE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.sun.xml.internal.bind.v2.model.core.ID
的用法示例。
在下文中一共展示了ID.NONE属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: canBeType
protected RawTypeSet.Mode canBeType(RawTypeSet parent) {
// if we have an adapter or IDness, which requires special
// annotation, and there's more than one element,
// we have no place to put the special annotation, so we need JAXBElement.
if((parent.refs.size()>1 || !parent.mul.isAtMostOnce()) && target.idUse()!=ID.NONE)
return RawTypeSet.Mode.MUST_BE_REFERENCE;
if(parent.refs.size() > 1 && target.getAdapterUse() != null)
return RawTypeSet.Mode.MUST_BE_REFERENCE;
// nillable and optional at the same time. needs an element wrapper to distinguish those
// two states. But this is not a hard requirement.
if(decl.isNillable() && parent.mul.isOptional())
return RawTypeSet.Mode.CAN_BE_TYPEREF;
return RawTypeSet.Mode.SHOULD_BE_TYPEREF;
}
示例2: calcId
private ID calcId() {
// TODO: share code with PropertyInfoImpl
if(reader().hasMethodAnnotation(XmlID.class,method)) {
return ID.ID;
} else
if(reader().hasMethodAnnotation(XmlIDREF.class,method)) {
return ID.IDREF;
} else {
return ID.NONE;
}
}
示例3: calcId
private ID calcId() {
if(seed.hasAnnotation(XmlID.class)) {
// check the type
if(!nav().isSameType(getIndividualType(), nav().ref(String.class)))
parent.builder.reportError(new IllegalAnnotationException(
Messages.ID_MUST_BE_STRING.format(getName()), seed )
);
return ID.ID;
} else
if(seed.hasAnnotation(XmlIDREF.class)) {
return ID.IDREF;
} else {
return ID.NONE;
}
}
示例4: makeID
public static TypeUse makeID( TypeUse t, ID id ) {
if(t.idUse()!=ID.NONE)
// I don't think we let users tweak the idness, so
// this error must indicate an inconsistency within the RI/spec.
throw new IllegalStateException();
return new TypeUseImpl( t.getInfo(), t.isCollection(), id, t.getExpectedMimeType(), t.getAdapterUse() );
}
示例5: calcId
private ID calcId() {
if(seed.hasAnnotation(XmlID.class)) {
// check the type
if(!getIndividualType().equals(nav().ref(String.class)))
parent.builder.reportError(new IllegalAnnotationException(
Messages.ID_MUST_BE_STRING.format(getName()), seed )
);
return ID.ID;
} else
if(seed.hasAnnotation(XmlIDREF.class)) {
return ID.IDREF;
} else {
return ID.NONE;
}
}
示例6: id
protected ID id() {
return ID.NONE;
}
示例7: idUse
public final ID idUse() {
return ID.NONE;
}
示例8: idUse
public ID idUse() {
return ID.NONE;
}
示例9: id
/**
* A reference property can never be ID/IDREF because they always point to
* other element classes.
*/
public ID id() {
return ID.NONE;
}