1 29 30 package com.caucho.config.jaxb; 31 32 import com.caucho.config.ConfigException; 33 import com.caucho.config.NodeBuilder; 34 import com.caucho.config.TypeStrategy; 35 import com.caucho.util.L10N; 36 37 import org.w3c.dom.Node ; 38 39 42 public class LongType extends TypeStrategy { 43 protected static final L10N L = new L10N(LongType.class); 44 45 public static final LongType TYPE = new LongType(); 46 47 private LongType() 48 { 49 } 50 51 54 public String getTypeName() 55 { 56 return getClass().getName(); 57 } 58 59 66 public Object configure(NodeBuilder builder, Node node, Object parent) 67 throws ConfigException 68 { 69 String textValue = node.getTextContent().trim(); 70 71 long value = builder.evalLong(textValue); 72 73 return new Long (value); 74 } 75 } 76 | Popular Tags |