org.snapscript.tree.define.EnumConstantBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of snap Show documentation
Show all versions of snap Show documentation
Dynamic scripting for the JVM
package org.snapscript.tree.define;
import static org.snapscript.core.Reserved.ENUM_VALUES;
import static org.snapscript.core.Reserved.TYPE_CLASS;
import static org.snapscript.core.Reserved.TYPE_THIS;
import java.util.List;
import org.snapscript.core.Scope;
import org.snapscript.core.Type;
public class EnumConstantBuilder extends ClassConstantBuilder {
public EnumConstantBuilder() {
super();
}
public void declare(Scope scope, Type type, List values) throws Exception {
declareConstant(scope, TYPE_THIS, type);
declareConstant(scope, TYPE_CLASS, type, type);
declareConstant(scope, ENUM_VALUES, type, values);
}
}