38 |
|
|
39 |
package org.omg.PortableServer.POAManagerPackage; |
package org.omg.PortableServer.POAManagerPackage; |
40 |
|
|
41 |
|
import gnu.CORBA.Minor; |
42 |
|
|
43 |
import org.omg.CORBA.BAD_OPERATION; |
import org.omg.CORBA.BAD_OPERATION; |
44 |
import org.omg.CORBA.portable.IDLEntity; |
import org.omg.CORBA.portable.IDLEntity; |
45 |
|
|
142 |
|
|
143 |
/** |
/** |
144 |
* Returns the State, matching the given integer constant. |
* Returns the State, matching the given integer constant. |
145 |
* |
* |
146 |
* @param code one of _HOLDING, _ACTIVE, _DISCARDING, _INACTIVE. |
* @param code one of _HOLDING, _ACTIVE, _DISCARDING, _INACTIVE. |
147 |
* @return one of HOLDING, ACTIVE, DISCARDING, INACTIVE. |
* @return one of HOLDING, ACTIVE, DISCARDING, INACTIVE. |
148 |
* @throws BAD_PARAM if the parameter is not one of the valid values. |
* @throws BAD_PARAM if the parameter is not one of the valid values. |
151 |
{ |
{ |
152 |
try |
try |
153 |
{ |
{ |
154 |
return enume [ code ]; |
return enume[code]; |
155 |
} |
} |
156 |
catch (ArrayIndexOutOfBoundsException ex) |
catch (ArrayIndexOutOfBoundsException ex) |
157 |
{ |
{ |
158 |
throw new BAD_OPERATION("Invalid enumeration code " + code); |
BAD_OPERATION bad = new BAD_OPERATION("Invalid state " + code); |
159 |
|
bad.minor = Minor.Enumeration; |
160 |
|
throw bad; |
161 |
} |
} |
162 |
} |
} |
163 |
|
|
164 |
/** |
/** |
165 |
* Returns a short string representation. |
* Returns a short string representation. |
166 |
|
* |
167 |
* @return the name of the current enumeration value. |
* @return the name of the current enumeration value. |
168 |
*/ |
*/ |
169 |
public String toString() |
public String toString() |