本文整理汇总了Java中org.simpleframework.xml.Attribute.required方法的典型用法代码示例。如果您正苦于以下问题:Java Attribute.required方法的具体用法?Java Attribute.required怎么用?Java Attribute.required使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.simpleframework.xml.Attribute
的用法示例。
在下文中一共展示了Attribute.required方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AttributeLabel
import org.simpleframework.xml.Attribute; //导入方法依赖的package包/类
/**
* Constructor for the <code>AttributeLabel</code> object. This
* is used to create a label that can convert from an object to an
* XML attribute and vice versa. This requires the annotation and
* contact extracted from the XML schema class.
*
* @param contact this is the field from the XML schema class
* @param label represents the annotation for the field
* @param format this is the format used to style the path
*/
public AttributeLabel(Contact contact, Attribute label, Format format) {
this.detail = new Introspector(contact, this, format);
this.decorator = new Qualifier(contact);
this.required = label.required();
this.type = contact.getType();
this.empty = label.empty();
this.name = label.name();
this.format = format;
this.label = label;
}