01:/*
02: * The contents of this file are subject to the Sapient Public License
03: * Version 1.0 (the "License"); you may not use this file except in compliance
04: * with the License. You may obtain a copy of the License at
05: * http://carbon.sf.net/License.html.
06: *
07: * Software distributed under the License is distributed on an "AS IS" basis,
08: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
09: * the specific language governing rights and limitations under the License.
10: *
11: * The Original Code is The Carbon Component Framework.
12: *
13: * The Initial Developer of the Original Code is Sapient Corporation
14: *
15: * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
16: */
17:
18:package org.sape.carbon.core.bootstrap;
19:
20:import org.sape.carbon.core.util.enum.BaseEnum;
21:import org.sape.carbon.core.util.enum.EnumNotFoundException;
22:
23:/**
24: * Enumeration of the possible states of the BootStrapper.
25: *
26: * Copyright 2002 Sapient
27: * @since carbon 1.0
28: * @author Douglas Voet, Febuary 2002
29: * @version $Revision: 1.9 $($Author: dvoet $ / $Date: 2003/05/05 21:21:11 $)
30: */
31:public class BootStrapperStateEnum extends BaseEnum {
32: /**
33: * Constructs a enumeration of type <code>BootStrapperStateEnum</code>.
34: * @param name the name of the enumeration instance
35: */
36: private BootStrapperStateEnum(String name) {
37: super (BootStrapperStateEnum.class, name);
38: }
39:
40: /** State of the BootStrapper when it has been loaded */
41: public static final BootStrapperStateEnum LOADED =
42: new BootStrapperStateEnum("loaded");
43:
44: /** State of the BootStrapper before it has been loaded */
45: public static final BootStrapperStateEnum NOT_LOADED =
46: new BootStrapperStateEnum("not loaded");
47:
48: /**
49: * @see BaseEnum#getByName
50: */
51: public static final BootStrapperStateEnum getByName(String name)
52: throws BootStrapperStateEnumNotFoundException {
53: return (BootStrapperStateEnum) BaseEnum.getByName(name,
54: BootStrapperStateEnum.class);
55: }
56:
57: /**
58: * @see BaseEnum#getByOrdinal
59: */
60: public static final BootStrapperStateEnum getByOrdinal(int ordinal)
61: throws BootStrapperStateEnumNotFoundException {
62: return (BootStrapperStateEnum) BaseEnum.getByOrdinal(ordinal,
63: BootStrapperStateEnum.class);
64: }
65:
66: /**
67: * @see EnumNotFoundException
68: */
69: public class BootStrapperStateEnumNotFoundException
70: extends EnumNotFoundException {
71: /**
72: * @see EnumNotFoundException#EnumNotFoundException
73: */
74: public BootStrapperStateEnumNotFoundException(
75: Class sourceClass,
76: String name) {
77:
78: super(sourceClass, name);
79: }
80:
81: }
82:
83:}
|