1 28 29 package org.jibx.binding.def; 30 31 import org.jibx.binding.classes.ContextMethodBuilder; 32 import org.jibx.runtime.JiBXException; 33 34 41 42 public class PassThroughComponent implements IComponent 43 { 44 45 protected IComponent m_component; 46 47 51 52 protected PassThroughComponent() {} 53 54 59 60 protected PassThroughComponent(IComponent comp) { 61 m_component = comp; 62 } 63 64 69 70 protected void setWrappedComponent(IComponent comp) { 71 m_component = comp; 72 } 73 74 77 public boolean isOptional() { 78 return m_component.isOptional(); 79 } 80 81 public boolean hasAttribute() { 82 return m_component.hasAttribute(); 83 } 84 85 public void genAttrPresentTest(ContextMethodBuilder mb) 86 throws JiBXException { 87 m_component.genAttrPresentTest(mb); 88 } 89 90 public void genAttributeUnmarshal(ContextMethodBuilder mb) 91 throws JiBXException { 92 m_component.genAttributeUnmarshal(mb); 93 } 94 95 public void genAttributeMarshal(ContextMethodBuilder mb) 96 throws JiBXException { 97 m_component.genAttributeMarshal(mb); 98 } 99 100 public boolean hasContent() { 101 return m_component.hasContent(); 102 } 103 104 public void genContentPresentTest(ContextMethodBuilder mb) 105 throws JiBXException { 106 m_component.genContentPresentTest(mb); 107 } 108 109 public void genContentUnmarshal(ContextMethodBuilder mb) 110 throws JiBXException { 111 m_component.genContentUnmarshal(mb); 112 } 113 114 public void genContentMarshal(ContextMethodBuilder mb) 115 throws JiBXException { 116 m_component.genContentMarshal(mb); 117 } 118 119 public void genNewInstance(ContextMethodBuilder mb) throws JiBXException { 120 m_component.genNewInstance(mb); 121 } 122 123 public String getType() { 124 return m_component.getType(); 125 } 126 127 public boolean hasId() { 128 return m_component.hasId(); 129 } 130 131 public void genLoadId(ContextMethodBuilder mb) throws JiBXException { 132 m_component.genLoadId(mb); 133 } 134 135 public boolean checkContentSequence(boolean text) throws JiBXException { 136 return m_component.checkContentSequence(text); 137 } 138 139 public void setLinkages() throws JiBXException { 140 m_component.setLinkages(); 141 } 142 143 public void print(int depth) { 145 throw new IllegalStateException 146 ("Method must be overridden by subclass" + 147 getClass().getName()); 148 } 149 } 150 | Popular Tags |