All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.umlg.java.metamodel.generated.OJVisibilityKindGEN Maven / Gradle / Ivy

There is a newer version: 2.0.15
Show newest version
/*
 * File generated by Grasland Grammar Generator on Dec 23, 2006 7:26:03 PM
 */
package org.umlg.java.metamodel.generated;

import org.umlg.java.metamodel.OJVisibilityKind;

/** Class ...
 */
abstract public class OJVisibilityKindGEN {
	static final public OJVisibilityKind DEFAULT = new OJVisibilityKind(0, "DEFAULT");
	static final public OJVisibilityKind PUBLIC = new OJVisibilityKind(1, "public");
	static final public OJVisibilityKind PRIVATE = new OJVisibilityKind(2, "private");
	static final public OJVisibilityKind PROTECTED = new OJVisibilityKind(3, "protected");
	static final protected OJVisibilityKind[] ALL = 
			{DEFAULT, PUBLIC, PRIVATE, PROTECTED};
	static final public String[] ALLNAMES = 
			{"DEFAULT", "public", "private", "protected"};
	final private int value;
	final private String name;

	/** Default constructor for OJVisibilityKind
	 * 
	 * @param value 
	 * @param name 
	 */
	protected OJVisibilityKindGEN(int value, String name) {
		this.value = value;
		this.name  = name;
	}

	static public OJVisibilityKind lookup(int key) {
		for (int i = 0; i < ALL.length; i++) {
			if (key == ALL[i].getValue()) { return ALL[i]; }
		}
		throw new IllegalArgumentException("No OJVisibilityKind exists for \'" + key + "\'." );
	}
	
	static public OJVisibilityKind lookup(String name) {
		for (int i = 0; i < ALL.length; i++) {
			if (name.equals(ALL[i].getName())) { return ALL[i]; }
		}
		throw new IllegalArgumentException("No OJVisibilityKind exists for \'" + name + "\'." );
	}
	
	public int getValue() {
		return value;
	}
	
	public String getName() {
		return name;
	}
	
	public String toString() {
		return getName();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy