1 7 8 package com.sun.corba.se.impl.orbutil; 9 10 import org.omg.CORBA.ORB ; 11 import java.io.Serializable ; 12 import java.util.Hashtable ; 13 import com.sun.corba.se.impl.io.TypeMismatchException; 14 import java.net.MalformedURLException ; 15 import com.sun.corba.se.impl.util.RepositoryId; 16 17 23 public final class RepIdDelegator 24 implements RepositoryIdStrings, 25 RepositoryIdUtility, 26 RepositoryIdInterface 27 { 28 30 public String createForAnyType(Class type) { 31 return RepositoryId.createForAnyType(type); 32 } 33 34 public String createForJavaType(Serializable ser) 35 throws TypeMismatchException 36 { 37 return RepositoryId.createForJavaType(ser); 38 } 39 40 public String createForJavaType(Class clz) 41 throws TypeMismatchException 42 { 43 return RepositoryId.createForJavaType(clz); 44 } 45 46 public String createSequenceRepID(java.lang.Object ser) { 47 return RepositoryId.createSequenceRepID(ser); 48 } 49 50 public String createSequenceRepID(Class clazz) { 51 return RepositoryId.createSequenceRepID(clazz); 52 } 53 54 public RepositoryIdInterface getFromString(String repIdString) { 55 return new RepIdDelegator(RepositoryId.cache.getId(repIdString)); 56 } 57 58 60 public boolean isChunkedEncoding(int valueTag) { 61 return RepositoryId.isChunkedEncoding(valueTag); 62 } 63 64 public boolean isCodeBasePresent(int valueTag) { 65 return RepositoryId.isCodeBasePresent(valueTag); 66 } 67 68 public String getClassDescValueRepId() { 69 return RepositoryId.kClassDescValueRepID; 70 } 71 72 public String getWStringValueRepId() { 73 return RepositoryId.kWStringValueRepID; 74 } 75 76 public int getTypeInfo(int valueTag) { 77 return RepositoryId.getTypeInfo(valueTag); 78 } 79 80 public int getStandardRMIChunkedNoRepStrId() { 81 return RepositoryId.kPreComputed_StandardRMIChunked_NoRep; 82 } 83 84 public int getCodeBaseRMIChunkedNoRepStrId() { 85 return RepositoryId.kPreComputed_CodeBaseRMIChunked_NoRep; 86 } 87 88 public int getStandardRMIChunkedId() { 89 return RepositoryId.kPreComputed_StandardRMIChunked; 90 } 91 92 public int getCodeBaseRMIChunkedId() { 93 return RepositoryId.kPreComputed_CodeBaseRMIChunked; 94 } 95 96 public int getStandardRMIUnchunkedId() { 97 return RepositoryId.kPreComputed_StandardRMIUnchunked; 98 } 99 100 public int getCodeBaseRMIUnchunkedId() { 101 return RepositoryId.kPreComputed_CodeBaseRMIUnchunked; 102 } 103 104 public int getStandardRMIUnchunkedNoRepStrId() { 105 return RepositoryId.kPreComputed_StandardRMIUnchunked_NoRep; 106 } 107 108 public int getCodeBaseRMIUnchunkedNoRepStrId() { 109 return RepositoryId.kPreComputed_CodeBaseRMIUnchunked_NoRep; 110 } 111 112 114 public Class getClassFromType() throws ClassNotFoundException { 115 return delegate.getClassFromType(); 116 } 117 118 public Class getClassFromType(String codebaseURL) 119 throws ClassNotFoundException , MalformedURLException 120 { 121 return delegate.getClassFromType(codebaseURL); 122 } 123 124 public Class getClassFromType(Class expectedType, 125 String codebaseURL) 126 throws ClassNotFoundException , MalformedURLException 127 { 128 return delegate.getClassFromType(expectedType, codebaseURL); 129 } 130 131 public String getClassName() { 132 return delegate.getClassName(); 133 } 134 135 public RepIdDelegator() {} 137 138 private RepIdDelegator(RepositoryId _delegate) { 141 this.delegate = _delegate; 142 } 143 144 private RepositoryId delegate; 145 146 public String toString() { 147 if (delegate != null) 148 return delegate.toString(); 149 else 150 return this.getClass().getName(); 151 } 152 153 public boolean equals(Object obj) { 154 if (delegate != null) 155 return delegate.equals(obj); 156 else 157 return super.equals(obj); 158 } 159 } 160 | Popular Tags |