1 7 8 package com.sun.corba.se.impl.ior.iiop; 9 10 import org.omg.IOP.TAG_JAVA_CODEBASE ; 11 12 import org.omg.CORBA_2_3.portable.OutputStream ; 13 14 import com.sun.corba.se.spi.ior.TaggedComponentBase ; 15 16 import com.sun.corba.se.spi.ior.iiop.JavaCodebaseComponent ; 17 18 21 public class JavaCodebaseComponentImpl extends TaggedComponentBase 22 implements JavaCodebaseComponent 23 { 24 private String URLs ; 25 26 public boolean equals( Object obj ) 27 { 28 if (obj == null) 29 return false ; 30 31 if (!(obj instanceof JavaCodebaseComponentImpl)) 32 return false ; 33 34 JavaCodebaseComponentImpl other = (JavaCodebaseComponentImpl)obj ; 35 36 return URLs.equals( other.getURLs() ) ; 37 } 38 39 public int hashCode() 40 { 41 return URLs.hashCode() ; 42 } 43 44 public String toString() 45 { 46 return "JavaCodebaseComponentImpl[URLs=" + URLs + "]" ; 47 } 48 49 public String getURLs() 50 { 51 return URLs ; 52 } 53 54 public JavaCodebaseComponentImpl( String URLs ) 55 { 56 this.URLs = URLs ; 57 } 58 59 public void writeContents(OutputStream os) 60 { 61 os.write_string( URLs ) ; 62 } 63 64 public int getId() 65 { 66 return TAG_JAVA_CODEBASE.value ; } 68 } 69 | Popular Tags |