1 19 package org.netbeans.modules.xslt.model.impl; 20 21 import org.netbeans.modules.xml.xam.dom.Attribute; 22 import org.netbeans.modules.xslt.model.LiteralResultElement; 23 import org.netbeans.modules.xslt.model.XslComponent; 24 import org.netbeans.modules.xslt.model.XslVisitor; 25 import org.w3c.dom.Element ; 26 27 28 32 class LiteralResultElementImpl extends SequenceElementConstructorImpl implements 33 LiteralResultElement 34 { 35 36 LiteralResultElementImpl( XslModelImpl model, Element e ) { 37 super(model, e); 38 } 39 40 43 @Override 44 public void accept( XslVisitor visitor ) 45 { 46 visitor.visit( this ); 47 } 48 49 52 @Override 53 public Class <? extends XslComponent> getComponentType() 54 { 55 return LiteralResultElement.class; 56 } 57 58 61 public String getAttribute( String attribute ) { 62 return getAttribute(new StringAttribute(attribute)); 63 } 64 65 68 public void setAttribute( String attribute, String value ) { 69 setAttribute(attribute, new StringAttribute(attribute), value); 70 } 71 72 static class StringAttribute implements Attribute { 73 74 StringAttribute( String name ) { 75 myName = name; 76 } 77 78 public Class getType() { 79 return String .class; 80 } 81 82 public String getName() { 83 return myName; 84 } 85 86 public Class getMemberType() { 87 return null; 88 } 89 90 private String myName; 91 } 92 93 } 94 | Popular Tags |