Skip to main content
summaryrefslogtreecommitdiffstats
blob: 0eccf1dd558b6c536f0749890e80ecaf9e9d60ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*******************************************************************************
 * Copyright (c) 2005, 2006 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 * IBM Corporation - initial API and implementation
 * yyyymmdd bug      Email and other contact information
 * -------- -------- -----------------------------------------------------------
 * 20060324   116750 rsinha@ca.ibm.com - Rupam Kuehner
 *******************************************************************************/
package org.eclipse.wst.ws.internal.wsrt;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.common.util.AbstractEnumerator;


public final class WebServiceScenario extends AbstractEnumerator
{

  public static final int BOTTOMUP = 0;
  public static final int TOPDOWN = 1;
  public static final int CLIENT = 2;
  
  public static final WebServiceScenario BOTTOMUP_LITERAL = new WebServiceScenario(BOTTOMUP, "BOTTOMUP");
  public static final WebServiceScenario TOPDOWN_LITERAL = new WebServiceScenario(TOPDOWN, "TOPDOWN");
  public static final WebServiceScenario CLIENT_LITERAL = new WebServiceScenario(CLIENT, "CLIENT");


  private static final WebServiceScenario[] VALUES_ARRAY =
    new WebServiceScenario[]
    {
	  BOTTOMUP_LITERAL,
	  TOPDOWN_LITERAL,
	  CLIENT_LITERAL,
    };

  public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));


  public static WebServiceScenario get(String name)
  {
    for (int i = 0; i < VALUES_ARRAY.length; ++i)
    {
      WebServiceScenario result = VALUES_ARRAY[i];
      if (result.toString().equals(name))
      {
        return result;
      }
    }
    return null;
  }


  public static WebServiceScenario get(int value)
  {
    switch (value)
    {
      case BOTTOMUP: return BOTTOMUP_LITERAL;
      case TOPDOWN: return TOPDOWN_LITERAL;
      case CLIENT: return CLIENT_LITERAL;
    }
    return null;	
  }

  /**
   * Only this class can construct instances.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  private WebServiceScenario(int value, String name)
  {
    super(value, name);
  }
  

} //WebServiceScenario

Back to the top