1 26 27 package org.objectweb.openccm.ast.lib; 28 29 30 import org.omg.CORBA.IDLType ; 31 32 33 import org.objectweb.openccm.ast.api.TypeKind; 34 35 36 import org.objectweb.openccm.ast.api.Declaration; 37 38 47 48 public class TypeRefImpl 49 extends ObjectBase 50 implements IDLTypeWrapper, 51 org.objectweb.openccm.ast.api.TypeRef 52 { 53 59 60 private IDLType type_; 61 62 63 private TypeKind kind_; 64 65 66 protected Declaration[] dependencies_; 67 68 74 80 protected 81 TypeRefImpl(IDLType type, 82 TypeKind kind) 83 { 84 type_ = type; 86 kind_ = kind; 87 dependencies_ = null; 88 } 89 90 96 99 protected String 100 getId() 101 { 102 if (kind_==TypeKind.tk_objref) 103 return "IDL:omg.org/CORBA/Object:1.0"; 104 throw new org.objectweb.openccm.ast.api.ASTError("Bad TypeKind!"); 105 } 106 107 113 119 124 public IDLType 125 getIDLType() 126 { 127 return type_; 128 } 129 130 136 141 public Declaration[] 142 getDependencies() 143 { 144 if (dependencies_!=null) 145 return dependencies_; 146 dependencies_ = new Declaration[0]; 147 return dependencies_; 148 } 149 150 156 161 public TypeKind 162 getTypeKind() 163 { 164 return kind_; 165 } 166 167 172 public boolean 173 isDeclaration() 174 { 175 return false; 176 } 177 178 } 179 | Popular Tags |