CPKIFGeneralSubtree.java
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 package com.orionsec.jpkif;
00010
00011 public class CPKIFGeneralSubtree {
00012 private long swigCPtr;
00013 protected boolean swigCMemOwn;
00014
00015 public CPKIFGeneralSubtree(long cPtr, boolean cMemoryOwn) {
00016 swigCMemOwn = cMemoryOwn;
00017 swigCPtr = cPtr;
00018 }
00019
00020 public static long getCPtr(CPKIFGeneralSubtree 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_CPKIFGeneralSubtree(swigCPtr);
00033 }
00034 swigCPtr = 0;
00035 }
00036 }
00037
00038 public CPKIFGeneralSubtree() {
00039 this(pkif_moduleJNI.new_CPKIFGeneralSubtree__SWIG_0(), true);
00040 }
00041
00042 public CPKIFGeneralSubtree(CPKIFBufferPtr genSubtree) {
00043 this(pkif_moduleJNI.new_CPKIFGeneralSubtree__SWIG_1(CPKIFBufferPtr.getCPtr(genSubtree), genSubtree), true);
00044 }
00045
00046 public CPKIFGeneralNamePtr GetBase() {
00047 return new CPKIFGeneralNamePtr(pkif_moduleJNI.CPKIFGeneralSubtree_GetBase(swigCPtr, this), true);
00048 }
00049
00050 public int GetMin() {
00051 return pkif_moduleJNI.CPKIFGeneralSubtree_GetMin(swigCPtr, this);
00052 }
00053
00054 public int GetMax() {
00055 return pkif_moduleJNI.CPKIFGeneralSubtree_GetMax(swigCPtr, this);
00056 }
00057
00058 public void SetBase(CPKIFGeneralNamePtr arg0) {
00059 pkif_moduleJNI.CPKIFGeneralSubtree_SetBase(swigCPtr, this, CPKIFGeneralNamePtr.getCPtr(arg0), arg0);
00060 }
00061
00062 public void SetMin(int arg0) {
00063 pkif_moduleJNI.CPKIFGeneralSubtree_SetMin(swigCPtr, this, arg0);
00064 }
00065
00066 public void SetMax(int arg0) {
00067 pkif_moduleJNI.CPKIFGeneralSubtree_SetMax(swigCPtr, this, arg0);
00068 }
00069
00070 public void SetEmpty() {
00071 pkif_moduleJNI.CPKIFGeneralSubtree_SetEmpty(swigCPtr, this);
00072 }
00073
00074 public static boolean IsSupported(CPKIFGeneralName.GENNAMETYPE type) {
00075 return pkif_moduleJNI.CPKIFGeneralSubtree_IsSupported(type.swigValue());
00076 }
00077
00078 public CPKIFGeneralSubtree.MatchState IsInSubtree(CPKIFNamePtr cert) {
00079 return CPKIFGeneralSubtree.MatchState.swigToEnum(pkif_moduleJNI.CPKIFGeneralSubtree_IsInSubtree__SWIG_0(swigCPtr, this, CPKIFNamePtr.getCPtr(cert), cert));
00080 }
00081
00082 public CPKIFGeneralSubtree.MatchState IsInSubtree(CPKIFGeneralNamePtr arg0) {
00083 return CPKIFGeneralSubtree.MatchState.swigToEnum(pkif_moduleJNI.CPKIFGeneralSubtree_IsInSubtree__SWIG_1(swigCPtr, this, CPKIFGeneralNamePtr.getCPtr(arg0), arg0));
00084 }
00085
00086 public CPKIFGeneralSubtree ShallowCopy() {
00087 long cPtr = pkif_moduleJNI.CPKIFGeneralSubtree_ShallowCopy(swigCPtr, this);
00088 return (cPtr == 0) ? null : new CPKIFGeneralSubtree(cPtr, false);
00089 }
00090
00091 public final static class MatchState {
00092 public final static MatchState MATCH = new MatchState("MATCH");
00093 public final static MatchState NO_MATCH = new MatchState("NO_MATCH");
00094 public final static MatchState NOT_APPLICABLE = new MatchState("NOT_APPLICABLE");
00095
00096 public final int swigValue() {
00097 return swigValue;
00098 }
00099
00100 public String toString() {
00101 return swigName;
00102 }
00103
00104 public static MatchState swigToEnum(int swigValue) {
00105 if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
00106 return swigValues[swigValue];
00107 for (int i = 0; i < swigValues.length; i++)
00108 if (swigValues[i].swigValue == swigValue)
00109 return swigValues[i];
00110 throw new IllegalArgumentException("No enum " + MatchState.class + " with value " + swigValue);
00111 }
00112
00113 private MatchState(String swigName) {
00114 this.swigName = swigName;
00115 this.swigValue = swigNext++;
00116 }
00117
00118 private MatchState(String swigName, int swigValue) {
00119 this.swigName = swigName;
00120 this.swigValue = swigValue;
00121 swigNext = swigValue+1;
00122 }
00123
00124 private MatchState(String swigName, MatchState swigEnum) {
00125 this.swigName = swigName;
00126 this.swigValue = swigEnum.swigValue;
00127 swigNext = this.swigValue+1;
00128 }
00129
00130 private static MatchState[] swigValues = { MATCH, NO_MATCH, NOT_APPLICABLE };
00131 private static int swigNext = 0;
00132 private final int swigValue;
00133 private final String swigName;
00134 }
00135
00136 }