
javagen.enum.ssp Maven / Gradle / Ivy
The newest version!
<%
// Copyright 2014 Foursquare Labs Inc. All Rights Reserved.
import com.foursquare.spindle.codegen.runtime.ScalaEnum
%>
<%@ val enum: ScalaEnum %>
<%--
// Scala Enumeration is awful, so we just generate our own enum-like thing
// here. Enumeration (and Java's type-safe enums) are just boilerplate-reducing
// conveniences, and since we're generating code, we don't need that
// convenience anyway.
--%>
public static interface Java${enum.name} {
public abstract int id();
public int getValue();
}