1 26 27 package org.objectweb.openccm.generator.translator.idl2java.lib; 28 29 31 38 39 public class PSDL_JavaTranslator 40 extends org.objectweb.openccm.generator.translator.idl2java.lib.IDL_JavaTranslator 41 implements org.objectweb.openccm.generator.translator.idl2java.api.PSDL_JavaTranslator 42 { 43 49 55 58 public PSDL_JavaTranslator() 59 { 60 } 61 62 68 74 81 public java.lang.String 82 toJava(org.objectweb.openccm.ast.api.PsdlTypeRef type) 83 { 84 org.objectweb.openccm.ast.api.TypeRef idl_type = null; 85 org.objectweb.openccm.ast.api.StorageTypeBase st_base = null; 86 87 if (type == null) 88 { 89 return ""; 90 } 91 idl_type = type.getTypeRef(); 92 if (idl_type != null) 93 { 94 return toJava(idl_type); 95 } 96 else 97 { 98 if (type.isRef()) 99 { return "byte[]"; 101 } 102 else 103 { st_base = type.getStorageTypeBase(); 105 return getAbsoluteName(st_base); 106 } 107 } 108 } 109 110 118 public java.lang.String 119 toJava(org.objectweb.openccm.ast.api.PsdlTypeRef type, 120 int mode) 121 { 122 org.objectweb.openccm.ast.api.TypeRef idl_type = null; 123 org.objectweb.openccm.ast.api.StorageTypeBase st_base = null; 124 125 if (type == null) 126 { 127 return ""; 128 } 129 idl_type = type.getTypeRef(); 130 if (idl_type != null) 131 { 132 return toJava(idl_type, mode); 133 } 134 else 135 { 136 if (type.isRef()) 137 { return "byte[]"; 139 } 140 else 141 { st_base = type.getStorageTypeBase(); 143 return getAbsoluteName(st_base)+"Holder"; 144 } 145 } 146 } 147 148 156 public java.lang.String 157 RefToJava(org.objectweb.openccm.ast.api.PsdlTypeRef type) 158 { 159 org.objectweb.openccm.ast.api.StorageTypeBase st_base = null; 160 161 if (type == null) 162 { 163 return ""; 164 } 165 st_base = type.getStorageTypeBase(); 166 return getAbsoluteName(st_base); 167 } 168 169 175 } 176 | Popular Tags |