Coverage Report - uk.co.badgersinfoil.asxsd.TypeDescriptor
 
Classes in this File Line Coverage Branch Coverage Complexity
TypeDescriptor
52% 
0% 
1
 
 1  
 package uk.co.badgersinfoil.asxsd;
 2  
 
 3  
 import org.eclipse.xsd.XSDConcreteComponent;
 4  
 import uk.co.badgersinfoil.metaas.dom.ASCompilationUnit;
 5  
 
 6  
 public class TypeDescriptor {
 7  
         private String typeName;
 8  
         // TODO: instead of, or in addition to 'array'; have some way of noting
 9  
         //       cases where a builtin type is used as a compromise for the
 10  
         //       actual schema type.  i.e. for xs:int, flag would be false,
 11  
         //       but for some simpleType derived from xs:int (which might have
 12  
         //       it's own documentation attached) it should be true.  This would
 13  
         //       be used to see it it is worth attaching documentation for the
 14  
         //       type into the locations where the type is used (since, with
 15  
         //       the declared AS type being builtin, there will not be a link
 16  
         //       to useful documentation elsewhere in the ASDocs).
 17  
         private boolean array;
 18  
         private String documentation;
 19  
         private ASCompilationUnit implementation;
 20  
         private XSDConcreteComponent component;
 21  
 
 22  
         public TypeDescriptor(String typeName,
 23  
                               boolean array,
 24  
                               String documentation,
 25  
                               XSDConcreteComponent component)
 26  59
         {
 27  59
                 this.typeName = typeName;
 28  59
                 this.array = array;
 29  59
                 this.documentation = documentation;
 30  59
                 this.component = component;
 31  59
         }
 32  
         public boolean isArray() {
 33  8
                 return array;
 34  
         }
 35  
         public void setArray(boolean array) {
 36  0
                 this.array = array;
 37  0
         }
 38  
         public String getDocumentation() {
 39  72
                 return documentation;
 40  
         }
 41  
         public void setDocumentation(String documentation) {
 42  0
                 this.documentation = documentation;
 43  0
         }
 44  
         public String getTypeName() {
 45  301
                 return typeName;
 46  
         }
 47  
         public void setTypeName(String typeName) {
 48  0
                 this.typeName = typeName;
 49  0
         }
 50  
         public ASCompilationUnit getImplementation() {
 51  0
                 return implementation;
 52  
         }
 53  
         /**
 54  
          * Returns the schema component for which this object describes the
 55  
          * ActionScript-mapped type.
 56  
          */
 57  
         public XSDConcreteComponent getComponent() {
 58  0
                 return component;
 59  
         }
 60  
         public void setImplementation(ASCompilationUnit implementation) {
 61  57
                 this.implementation = implementation;
 62  57
         }
 63  
         public boolean hasImplementation() {
 64  0
                 return implementation != null;
 65  
         }
 66  
         public String toString() {
 67  0
                 return "[TypeDescriptor:"+typeName+"]";
 68  
         }
 69  
 }