1 19 20 package org.netbeans.modules.xml.axi.datatype; 21 22 import java.util.ArrayList ; 23 import java.util.Collections ; 24 import java.util.List ; 25 import org.netbeans.modules.xml.axi.datatype.Datatype.Facet; 26 27 35 public class UnionType extends Datatype { 36 37 static List <Facet> applicableFacets; 38 39 private Datatype.Kind kind; 40 41 protected boolean hasFacets; 42 43 private boolean isList; 44 45 48 public UnionType() { 49 this.kind = Datatype.Kind.UNION; 50 } 51 52 public Kind getKind() { 53 return kind; 54 } 55 56 public List <Facet> getApplicableFacets() { 57 if(applicableFacets == null) { 58 List <Facet> facets = new ArrayList <Facet>(); 59 applicableFacets = Collections.unmodifiableList(facets); 60 } 61 return applicableFacets; 62 } 63 64 public boolean hasFacets() { 65 return hasFacets; 66 } 67 68 public boolean isList() { 69 return isList; 70 } 71 72 public void setIsList(boolean isList) { 73 this.isList = isList; 74 } 75 76 public void addMemberType(Datatype memberType) { 77 m.add(memberType); 78 } 79 80 public List <Datatype> getMemberTypes() { 81 return m; 82 } 83 84 public void setHasFacets(boolean hasFacets) { 85 this.hasFacets = hasFacets; 86 } 87 88 List <Datatype> m = new ArrayList <Datatype>(); 89 } 90 | Popular Tags |