![JAR search and dependency download from the Maven repository](/logo.png)
org.allGraphQLCases.client.pojo.EnumWithReservedJavaKeywordAsValues Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graphql-maven-plugin-samples-allGraphQLCases-pojo-client Show documentation
Show all versions of graphql-maven-plugin-samples-allGraphQLCases-pojo-client Show documentation
This module do integration tests for the generatePojo goal, in client mode
The newest version!
/** Generated by the default template from graphql-java-generator */
package org.allGraphQLCases.client.pojo;
import com.graphql_java_generator.annotation.GraphQLDirective;
import com.graphql_java_generator.annotation.GraphQLEnumType;
/**
*
* @author generated by graphql-java-generator
* @see https://github.com/graphql-java-generator/graphql-java-generator
*/
@GraphQLEnumType("EnumWithReservedJavaKeywordAsValues")
@SuppressWarnings("unused")
public enum EnumWithReservedJavaKeywordAsValues {
_abstract("abstract"),
_assert("assert"),
_boolean("boolean"),
_break("break"),
_byte("byte"),
_case("case"),
_catch("catch"),
_char("char"),
_class("class"),
_const("const"),
_continue("continue"),
_default("default"),
_do("do"),
_double("double"),
_else("else"),
_enum("enum"),
_extends("extends"),
_final("final"),
_finally("finally"),
_float("float"),
_for("for"),
_goto("goto"),
_if("if"),
_implements("implements"),
_import("import"),
_instanceof("instanceof"),
_int("int"),
_interface("interface"),
_long("long"),
_native("native"),
_new("new"),
_package("package"),
_private("private"),
_protected("protected"),
_public("public"),
_return("return"),
_short("short"),
_static("static"),
_strictfp("strictfp"),
_super("super"),
_switch("switch"),
_synchronized("synchronized"),
_this("this"),
_throw("throw"),
_throws("throws"),
_transient("transient"),
_try("try"),
_void("void"),
_volatile("volatile"),
_while("while");
// The graphQlValue is needed on server side, to map the enum value to the value defined in the GraphQL schema. They are different
// when the value in the GraphQL schema is a java reserved keyword.
private final String graphQlValue;
/**
* Returns the value of this constant, as specified in the GraphQL schema. This is usually the same as the enum
* item's name. But it will differ if this name is a java reserved keyword (in which case the name is prefixed by an
* underscore)
*
* @return the enum constant with the specified name, as defined in the GraphQL schema
*/
public String graphQlValue() {
return graphQlValue;
}
/**
* Returns the enum constant of this type with the specified name (as specified in the GraphQL schema). The string
* must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters
* are not permitted.)
*
* @param graphQlValue
* The value, as defined in the GraphQL schema. This is usually the same as the enum item's name. But it
* will differ if this name is a java reserved keyword (in which case the name is prefixed by an
* underscore)
* @return the enum constant with the specified name
* @throws IllegalArgumentException
* if this enum type has no constant with the specified GraphQL name
*/
static public EnumWithReservedJavaKeywordAsValues fromGraphQlValue(String graphQlValue) {
if (graphQlValue == null) {
return null;
}
for (EnumWithReservedJavaKeywordAsValues e : EnumWithReservedJavaKeywordAsValues.values()) {
if (e.graphQlValue().equals(graphQlValue)) {
return e;
}
}
throw new IllegalArgumentException("No EnumWithReservedJavaKeywordAsValues exists with '" + graphQlValue + "' as a GraphQL value");
}
EnumWithReservedJavaKeywordAsValues(String graphQlValue) {
this.graphQlValue = graphQlValue;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy