home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / javax / naming / spi / ResolveResult.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.2 KB  |  81 lines

  1. package javax.naming.spi;
  2.  
  3. import java.io.Serializable;
  4. import javax.naming.CompositeName;
  5. import javax.naming.InvalidNameException;
  6. import javax.naming.Name;
  7.  
  8. public class ResolveResult implements Serializable {
  9.    protected Object resolvedObj;
  10.    protected Name remainingName;
  11.  
  12.    protected ResolveResult() {
  13.       this.resolvedObj = null;
  14.       this.remainingName = null;
  15.    }
  16.  
  17.    public ResolveResult(Object var1, String var2) {
  18.       this.resolvedObj = var1;
  19.  
  20.       try {
  21.          this.remainingName = new CompositeName(var2);
  22.       } catch (InvalidNameException var4) {
  23.       }
  24.  
  25.    }
  26.  
  27.    public ResolveResult(Object var1, Name var2) {
  28.       this.resolvedObj = var1;
  29.       this.setRemainingName(var2);
  30.    }
  31.  
  32.    public Name getRemainingName() {
  33.       return this.remainingName;
  34.    }
  35.  
  36.    public Object getResolvedObj() {
  37.       return this.resolvedObj;
  38.    }
  39.  
  40.    public void setRemainingName(Name var1) {
  41.       if (var1 != null) {
  42.          this.remainingName = (Name)var1.clone();
  43.       } else {
  44.          this.remainingName = null;
  45.       }
  46.  
  47.    }
  48.  
  49.    public void appendRemainingName(Name var1) {
  50.       if (var1 != null) {
  51.          if (this.remainingName != null) {
  52.             try {
  53.                this.remainingName.addAll(var1);
  54.             } catch (InvalidNameException var3) {
  55.             }
  56.          } else {
  57.             this.remainingName = (Name)var1.clone();
  58.          }
  59.       }
  60.  
  61.    }
  62.  
  63.    public void appendRemainingComponent(String var1) {
  64.       if (var1 != null) {
  65.          CompositeName var2 = new CompositeName();
  66.  
  67.          try {
  68.             var2.add(var1);
  69.          } catch (InvalidNameException var4) {
  70.          }
  71.  
  72.          this.appendRemainingName(var2);
  73.       }
  74.  
  75.    }
  76.  
  77.    public void setResolvedObj(Object var1) {
  78.       this.resolvedObj = var1;
  79.    }
  80. }
  81.