Java 类org.simpleframework.xml.Default 实例源码

项目:simplexml    文件:DetailScanner.java   
/**
 * This method is used to extract the annotations associated with
 * the type. Annotations extracted include the <code>Root</code> 
 * annotation and the <code>Namespace</code> annotation as well as
 * other annotations that are used to describe the type.
 * 
 * @param type this is the type to extract the annotations from
 */
private void extract(Class type) {
   for(Annotation label : labels) {
      if(label instanceof Namespace) {
         namespace(label);
      }
      if(label instanceof NamespaceList) {
         scope(label);
      }
      if(label instanceof Root) {
         root(label);
      }
      if(label instanceof Order) {
         order(label);
      }
      if(label instanceof Default) {
         access(label);
      }
   }
}
项目:simple-xml    文件:DetailScanner.java   
/**
 * This method is used to extract the annotations associated with
 * the type. Annotations extracted include the <code>Root</code> 
 * annotation and the <code>Namespace</code> annotation as well as
 * other annotations that are used to describe the type.
 * 
 * @param type this is the type to extract the annotations from
 */
private void extract(Class type) {
   for(Annotation label : labels) {
      if(label instanceof Namespace) {
         namespace(label);
      }
      if(label instanceof NamespaceList) {
         scope(label);
      }
      if(label instanceof Root) {
         root(label);
      }
      if(label instanceof Order) {
         order(label);
      }
      if(label instanceof Default) {
         access(label);
      }
   }
}
项目:simplexml    文件:DetailScanner.java   
/**
 * This is used to set the optional <code>Default</code> annotation for
 * the class. The default can only be set once, so if a super type also
 * has a default annotation define it must be ignored. 
 * 
 * @param label this is the label used to define the defaults
 */
private void access(Annotation label) {
   if(label != null) {
      Default value = (Default)label;

      required = value.required();
      access = value.value();
   }
}
项目:simple-xml    文件:DetailScanner.java   
/**
 * This is used to set the optional <code>Default</code> annotation for
 * the class. The default can only be set once, so if a super type also
 * has a default annotation define it must be ignored. 
 * 
 * @param label this is the label used to define the defaults
 */
private void access(Annotation label) {
   if(label != null) {
      Default value = (Default)label;

      required = value.required();
      access = value.value();
   }
}