CPKIFGeneralName.java

Go to the documentation of this file.
00001 /* ----------------------------------------------------------------------------
00002  * This file was automatically generated by SWIG (http://www.swig.org).
00003  * Version 2.0.1
00004  *
00005  * Do not make changes to this file unless you know what you are doing--modify
00006  * the SWIG interface file instead.
00007  * ----------------------------------------------------------------------------- */
00008 
00009 package com.orionsec.jpkif;
00010 
00011 public class CPKIFGeneralName {
00012   private long swigCPtr;
00013   protected boolean swigCMemOwn;
00014 
00015   public CPKIFGeneralName(long cPtr, boolean cMemoryOwn) {
00016     swigCMemOwn = cMemoryOwn;
00017     swigCPtr = cPtr;
00018   }
00019 
00020   public static long getCPtr(CPKIFGeneralName obj) {
00021     return (obj == null) ? 0 : obj.swigCPtr;
00022   }
00023 
00024   protected void finalize() {
00025     delete();
00026   }
00027 
00028   public synchronized void delete() {
00029     if (swigCPtr != 0) {
00030       if (swigCMemOwn) {
00031         swigCMemOwn = false;
00032         pkif_moduleJNI.delete_CPKIFGeneralName(swigCPtr);
00033       }
00034       swigCPtr = 0;
00035     }
00036   }
00037 
00038   public CPKIFGeneralName() {
00039     this(pkif_moduleJNI.new_CPKIFGeneralName__SWIG_0(), true);
00040   }
00041 
00042   public CPKIFGeneralName(CPKIFNamePtr name) {
00043     this(pkif_moduleJNI.new_CPKIFGeneralName__SWIG_1(CPKIFNamePtr.getCPtr(name), name), true);
00044   }
00045 
00046   public CPKIFGeneralName(CPKIFBufferPtr name) {
00047     this(pkif_moduleJNI.new_CPKIFGeneralName__SWIG_2(CPKIFBufferPtr.getCPtr(name), name), true);
00048   }
00049 
00050   public CPKIFBufferPtr otherName() {
00051     return new CPKIFBufferPtr(pkif_moduleJNI.CPKIFGeneralName_otherName(swigCPtr, this), true);
00052   }
00053 
00054   public String rfc822Name() {
00055     return pkif_moduleJNI.CPKIFGeneralName_rfc822Name(swigCPtr, this);
00056   }
00057 
00058   public String dnsName() {
00059     return pkif_moduleJNI.CPKIFGeneralName_dnsName(swigCPtr, this);
00060   }
00061 
00062   public CPKIFBufferPtr x400Address() {
00063     return new CPKIFBufferPtr(pkif_moduleJNI.CPKIFGeneralName_x400Address(swigCPtr, this), true);
00064   }
00065 
00066   public CPKIFNamePtr directoryName() {
00067     return new CPKIFNamePtr(pkif_moduleJNI.CPKIFGeneralName_directoryName(swigCPtr, this), true);
00068   }
00069 
00070   public String uri() {
00071     return pkif_moduleJNI.CPKIFGeneralName_uri(swigCPtr, this);
00072   }
00073 
00074   public CPKIFBufferPtr ipAddress() {
00075     return new CPKIFBufferPtr(pkif_moduleJNI.CPKIFGeneralName_ipAddress(swigCPtr, this), true);
00076   }
00077 
00078   public CPKIFOIDPtr oid() {
00079     return new CPKIFOIDPtr(pkif_moduleJNI.CPKIFGeneralName_oid(swigCPtr, this), true);
00080   }
00081 
00082   public CPKIFGeneralName.GENNAMETYPE GetType() {
00083     return CPKIFGeneralName.GENNAMETYPE.swigToEnum(pkif_moduleJNI.CPKIFGeneralName_GetType(swigCPtr, this));
00084   }
00085 
00086   public void Decode(CPKIFBufferPtr bp) {
00087     pkif_moduleJNI.CPKIFGeneralName_Decode(swigCPtr, this, CPKIFBufferPtr.getCPtr(bp), bp);
00088   }
00089 
00090   public CPKIFBufferPtr Encoded() {
00091     return new CPKIFBufferPtr(pkif_moduleJNI.CPKIFGeneralName_Encoded(swigCPtr, this), true);
00092   }
00093 
00094   public final static class GENNAMETYPE {
00095     public final static GENNAMETYPE NOTSET = new GENNAMETYPE("NOTSET");
00096     public final static GENNAMETYPE OTHERNAME = new GENNAMETYPE("OTHERNAME");
00097     public final static GENNAMETYPE RFC822 = new GENNAMETYPE("RFC822");
00098     public final static GENNAMETYPE DNSNAME = new GENNAMETYPE("DNSNAME");
00099     public final static GENNAMETYPE X400ADDRESS = new GENNAMETYPE("X400ADDRESS");
00100     public final static GENNAMETYPE DIRECTORYNAME = new GENNAMETYPE("DIRECTORYNAME");
00101     public final static GENNAMETYPE EDIPARTYNAME = new GENNAMETYPE("EDIPARTYNAME");
00102     public final static GENNAMETYPE URI = new GENNAMETYPE("URI");
00103     public final static GENNAMETYPE IPADDRESS = new GENNAMETYPE("IPADDRESS");
00104     public final static GENNAMETYPE OID = new GENNAMETYPE("OID");
00105 
00106     public final int swigValue() {
00107       return swigValue;
00108     }
00109 
00110     public String toString() {
00111       return swigName;
00112     }
00113 
00114     public static GENNAMETYPE swigToEnum(int swigValue) {
00115       if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
00116         return swigValues[swigValue];
00117       for (int i = 0; i < swigValues.length; i++)
00118         if (swigValues[i].swigValue == swigValue)
00119           return swigValues[i];
00120       throw new IllegalArgumentException("No enum " + GENNAMETYPE.class + " with value " + swigValue);
00121     }
00122 
00123     private GENNAMETYPE(String swigName) {
00124       this.swigName = swigName;
00125       this.swigValue = swigNext++;
00126     }
00127 
00128     private GENNAMETYPE(String swigName, int swigValue) {
00129       this.swigName = swigName;
00130       this.swigValue = swigValue;
00131       swigNext = swigValue+1;
00132     }
00133 
00134     private GENNAMETYPE(String swigName, GENNAMETYPE swigEnum) {
00135       this.swigName = swigName;
00136       this.swigValue = swigEnum.swigValue;
00137       swigNext = this.swigValue+1;
00138     }
00139 
00140     private static GENNAMETYPE[] swigValues = { NOTSET, OTHERNAME, RFC822, DNSNAME, X400ADDRESS, DIRECTORYNAME, EDIPARTYNAME, URI, IPADDRESS, OID };
00141     private static int swigNext = 0;
00142     private final int swigValue;
00143     private final String swigName;
00144   }
00145 
00146 }

Generated on Mon Nov 15 11:15:48 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6