Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*    */ package com.sun.xml.bind.v2.runtime;
 /*    */ 
 /*    */ import java.io.IOException;
 /*    */ import javax.xml.namespace.QName;
 /*    */ import javax.xml.stream.XMLStreamException;
 /*    */ import org.xml.sax.SAXException;
 /*    */ 
 /*    */ public class SchemaTypeTransducer<V> extends FilterTransducer<V>
/*    */ {
/*    */   private final QName schemaType;
/*    */ 
/*    */   public SchemaTypeTransducer(Transducer<V> coreQName schemaType)
/*    */   {
/* 64 */     super(core);
/* 65 */     this.schemaType = schemaType;
/*    */   }
/*    */ 
/*    */   public CharSequence print(V othrows AccessorException
/*    */   {
/* 70 */     XMLSerializer w = XMLSerializer.getInstance();
/* 71 */     QName old = w.setSchemaType(this.schemaType);
/*    */     try {
/* 73 */       CharSequence localCharSequence = this.core.print(o);
/*    */       return localCharSequence;
/*    */     }
/*    */     finally
/*    */     {
/* 75 */       w.setSchemaType(old);
/* 76 */     }throw localObject;
/*    */   }
/*    */ 
/*    */   public void writeText(XMLSerializer w, V oString fieldNamethrows IOExceptionSAXExceptionXMLStreamExceptionAccessorException
/*    */   {
/* 81 */     QName old = w.setSchemaType(this.schemaType);
/*    */     try {
/* 83 */       this.core.writeText(w, o, fieldName);
/*    */     } finally {
/* 85 */       w.setSchemaType(old);
/*    */     }
/*    */   }
/*    */ 
/*    */   public void writeLeafElement(XMLSerializer wName tagName, V oString fieldNamethrows IOExceptionSAXExceptionXMLStreamExceptionAccessorException
/*    */   {
/* 91 */     QName old = w.setSchemaType(this.schemaType);
/*    */     try {
/* 93 */       this.core.writeLeafElement(w, tagName, o, fieldName);
/*    */     } finally {
/* 95 */       w.setSchemaType(old);
/*    */     }
/*    */   }
/*    */ }
/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/thirdparty-all.jar
 * Qualified Name:     com.sun.xml.bind.v2.runtime.SchemaTypeTransducer
 * JD-Core Version:    0.6.0
 */
New to GrepCode? Check out our FAQ X