Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*     */ package com.sun.xml.bind.v2.schemagen;
 /*     */ 
 /*     */ import com.sun.xml.txw2.TypedXmlWriter;
 /*     */ import javax.xml.bind.annotation.XmlNsForm;
 /*     */ import javax.xml.namespace.QName;
 /*     */ 
/*     */  enum Form
/*     */ {
/*  53 */   QUALIFIED(.true), 
/*     */ 
/*  58 */   UNQUALIFIED(.false), 
/*     */ 
/*  65 */   UNSET(.false);
/*     */ 
/*     */   private final XmlNsForm xnf;
/*     */   public final boolean isEffectivelyQualified;
/*     */ 
/*     */   private Form(XmlNsForm xnfboolean effectivelyQualified)
/*     */   {
/*  81 */     this.xnf = xnf;
/*  82 */     this.isEffectivelyQualified = effectivelyQualified;
/*     */   }
/*     */ 
/*     */   abstract void declare(String paramStringSchema paramSchema);
/*     */ 
/*     */   public void writeForm(LocalElement eQName tagName)
/*     */   {
/*  95 */     _writeForm(e, tagName);
/*     */   }
/*     */ 
/*     */   public void writeForm(LocalAttribute aQName tagName) {
/*  99 */     _writeForm(a, tagName);
/*     */   }
/*     */ 
/*     */   private void _writeForm(TypedXmlWriter eQName tagName) {
/* 103 */     boolean qualified = tagName.getNamespaceURI().length() > 0;
/*     */ 
/* 105 */     if ((qualified) && (this != QUALIFIED)) {
/* 106 */       e._attribute("form""qualified");
/*     */     }
/* 108 */     else if ((!qualified) && (this == QUALIFIED))
/* 109 */       e._attribute("form""unqualified");
/*     */   }
/*     */ 
/*     */   public static Form get(XmlNsForm xnf)
/*     */   {
/* 116 */     for (Form v : values()) {
/* 117 */       if (v.xnf == xnf)
/* 118 */         return v;
/*     */     }
/* 120 */     throw new IllegalArgumentException();
/*     */   }
/*     */ }
/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/thirdparty-all.jar
 * Qualified Name:     com.sun.xml.bind.v2.schemagen.Form
 * JD-Core Version:    0.6.0
 */
New to GrepCode? Check out our FAQ X