rythm-android.enum.txt Maven / Gradle / Ivy
@args com.linkedin.pegasus.generator.spec.EnumTemplateSpec enumeration
@import org.coursera.courier.android.JavaSyntax
@import org.coursera.courier.android.JavadocEscaping
@if (enumeration.getNamespace() != null && enumeration.getNamespace().length() > 0) {package @enumeration.getNamespace();}
import javax.annotation.Generated;
@{ String className = JavaSyntax.escapeKeyword(enumeration.getClassName()) }
@** TODO: need an UNKNOWN symbol.
* https://github.com/google/gson/issues/640
* Maybe we just need to use strings to represent enum values?
*@
@classAnnotations(enumeration.getSchema())
public enum @className {
@{Map symbolDocs = enumeration.getSchema().getSymbolDocs()}
@for(String symbol: enumeration.getSchema().getSymbols()) {
@{String symbolDoc = symbolDocs.get(symbol)}
@if(symbolDoc != null) {
@* TODO: Add deprecated support *@
@JavadocEscaping.stringToJavadoc(symbolDoc, null)
}
@JavaSyntax.escapeKeyword(symbol),
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy