org.immutables.fixture.encoding.defs.CompactOptionalIntEnabled Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of value-fixture Show documentation
Show all versions of value-fixture Show documentation
Module that contains all tests for the code generation capability
package org.immutables.fixture.encoding.defs;
import org.immutables.encode.EncodingMetadata;
@EncodingMetadata(
name = "org.immutables.fixture.encoding.defs.CompactOptionalInt",
imports = {
},
typeParams = {},
elements = {
@EncodingMetadata.Element(
name = "opt",
tags = {"IMPL", "PRIVATE", "FINAL", "VIRTUAL"},
naming = "*",
stdNaming = "NONE",
type = "java.util.OptionalInt",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "",
thrown = {}
),
@EncodingMetadata.Element(
name = "compactOptionalInt_from",
tags = {"STATIC", "PRIVATE", "FROM", "SYNTH"},
naming = "*_from",
stdNaming = "NONE",
type = "java.util.OptionalInt",
typeParams = {},
params = {"value: java.util.OptionalInt"},
doc = {},
annotations = {},
code = "{\nreturn @^value;\n}",
thrown = {}
),
@EncodingMetadata.Element(
name = "toString",
tags = {"PRIVATE", "TO_STRING", "SYNTH"},
naming = "*_toString",
stdNaming = "NONE",
type = "java.lang.String",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "{\nreturn @:get().toString();\n}",
thrown = {}
),
@EncodingMetadata.Element(
name = "hashCode",
tags = {"PRIVATE", "HASH_CODE", "SYNTH"},
naming = "*_hashCode",
stdNaming = "NONE",
type = "int",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "{\nreturn @:get().hashCode();\n}",
thrown = {}
),
@EncodingMetadata.Element(
name = "equals",
tags = {"PRIVATE", "EQUALS", "SYNTH"},
naming = "*_equals",
stdNaming = "NONE",
type = "java.lang.String",
typeParams = {},
params = {"other: org.immutables.fixture.encoding.defs.CompactOptionalInt"},
doc = {},
annotations = {},
code = "{\nreturn this.@:get().equals(@^other.@:get())\n;}",
thrown = {}
),
@EncodingMetadata.Element(
name = "compactOptionalInt_build",
tags = {"BUILDER", "PRIVATE", "BUILD", "SYNTH"},
naming = "*_build",
stdNaming = "NONE",
type = "java.util.OptionalInt",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "{\nif (@@compactOptionalInt_builder == null) throw new java.lang.IllegalStateException(\"\'<*>\' is not initialized\");\nreturn @@compactOptionalInt_builder;\n}",
thrown = {}
),
@EncodingMetadata.Element(
name = "compactOptionalInt_isSet",
tags = {"BUILDER", "PRIVATE", "SYNTH", "IS_INIT"},
naming = "*_isSet",
stdNaming = "NONE",
type = "boolean",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "{\nreturn this.@@compactOptionalInt_builder != null;\n}",
thrown = {}
),
@EncodingMetadata.Element(
name = "value",
tags = {"PRIVATE", "FINAL", "FIELD"},
naming = "*_value",
stdNaming = "NONE",
type = "int",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "@@opt.orElse(0)",
thrown = {}
),
@EncodingMetadata.Element(
name = "present",
tags = {"PRIVATE", "FINAL", "FIELD"},
naming = "*_present",
stdNaming = "NONE",
type = "boolean",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "@@opt.isPresent()",
thrown = {}
),
@EncodingMetadata.Element(
name = "get",
tags = {"EXPOSE"},
naming = "*",
stdNaming = "NONE",
type = "java.util.OptionalInt",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "{\nreturn @@present\n? java.util.OptionalInt.of(@@value)\n: java.util.OptionalInt.empty();\n}",
thrown = {}
),
@EncodingMetadata.Element(
name = "compactOptionalInt_copy",
tags = {"COPY", "SYNTH"},
naming = "*",
stdNaming = "NONE",
type = "java.util.OptionalInt",
typeParams = {},
params = {"value: java.util.OptionalInt"},
doc = {},
annotations = {},
code = "{\nreturn @^value;\n}",
thrown = {}
),
@EncodingMetadata.Element(
name = "compactOptionalInt_builder",
tags = {"BUILDER", "PRIVATE", "FIELD", "SYNTH"},
naming = "*_builder",
stdNaming = "NONE",
type = "java.util.OptionalInt",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "",
thrown = {}
),
@EncodingMetadata.Element(
name = "compactOptionalInt_set",
tags = {"BUILDER", "INIT", "COPY", "SYNTH"},
naming = "*",
stdNaming = "NONE",
type = "void",
typeParams = {},
params = {"value: java.util.OptionalInt"},
doc = {},
annotations = {},
code = "{\nthis.@@compactOptionalInt_builder = @^value;\n}",
thrown = {}
)
}
)
public @interface CompactOptionalIntEnabled {}