org.immutables.fixture.encoding.defs.TableEncodingEnabled 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.TableEncoding",
imports = {
},
typeParams = {"R", "C", "V"},
elements = {
@EncodingMetadata.Element(
name = "value",
tags = {"IMPL", "PRIVATE", "FINAL", "FIELD"},
naming = "*",
stdNaming = "NONE",
type = "com.google.common.collect.ImmutableTable",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "com.google.common.collect.ImmutableTable.of()",
thrown = {}
),
@EncodingMetadata.Element(
name = "init",
tags = {"STATIC", "PRIVATE", "FROM"},
naming = "*_init",
stdNaming = "NONE",
type = "com.google.common.collect.ImmutableTable",
typeParams = {},
params = {"table: com.google.common.collect.Table extends R, ? extends C, ? extends V>"},
doc = {},
annotations = {},
code = "{\nreturn com.google.common.collect.ImmutableTable.copyOf(@^table);\n}",
thrown = {}
),
@EncodingMetadata.Element(
name = "toString",
tags = {"PRIVATE", "TO_STRING"},
naming = "*_toString",
stdNaming = "NONE",
type = "java.lang.String",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "{\nString actuallyInvolvedToString = @@value.toString() + @@SILLY_CONSTANT;\nreturn actuallyInvolvedToString;\n}",
thrown = {}
),
@EncodingMetadata.Element(
name = "hashCode",
tags = {"PRIVATE", "HASH_CODE"},
naming = "*_hashCode",
stdNaming = "NONE",
type = "int",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "{\nreturn @@value.hashCode() + 1;\n}",
thrown = {}
),
@EncodingMetadata.Element(
name = "equals",
tags = {"PRIVATE", "EQUALS"},
naming = "*_equals",
stdNaming = "NONE",
type = "boolean",
typeParams = {},
params = {"other: org.immutables.fixture.encoding.defs.TableEncoding"},
doc = {},
annotations = {},
code = "{\nreturn @@value.equals(@^other.@@value);\n}",
thrown = {}
),
@EncodingMetadata.Element(
name = "build",
tags = {"BUILDER", "PRIVATE", "BUILD"},
naming = "*_build",
stdNaming = "NONE",
type = "com.google.common.collect.ImmutableTable",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "{\nreturn @@builder.build();\n}",
thrown = {}
),
@EncodingMetadata.Element(
name = "SMART_NULL",
tags = {"STATIC", "FINAL", "FIELD"},
naming = "*_SMART_NULL",
stdNaming = "NONE",
type = "java.lang.Void",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "null",
thrown = {}
),
@EncodingMetadata.Element(
name = "SILLY_CONSTANT",
tags = {"STATIC", "PRIVATE", "FINAL", "FIELD"},
naming = "*_SILLY_CONSTANT",
stdNaming = "NONE",
type = "java.lang.String",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "\"{T}\"",
thrown = {}
),
@EncodingMetadata.Element(
name = "tableSize",
tags = {"PRIVATE", "FINAL", "FIELD"},
naming = "*_tableSize",
stdNaming = "NONE",
type = "int",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "@@value.size()",
thrown = {}
),
@EncodingMetadata.Element(
name = "accessor",
tags = {"EXPOSE"},
naming = "*",
stdNaming = "NONE",
type = "com.google.common.collect.Table",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "{\nreturn @@value;\n}",
thrown = {}
),
@EncodingMetadata.Element(
name = "withPut",
tags = {"COPY"},
naming = "with*Put",
stdNaming = "NONE",
type = "com.google.common.collect.ImmutableTable",
typeParams = {},
params = {"row: R", "column: C", "value: V"},
doc = {},
annotations = {},
code = "{\nreturn com.google.common.collect.ImmutableTable.<@^R, @^C, @^V>builder()\n.put(@^row, @^column, @^value)\n.build();\n}",
thrown = {}
),
@EncodingMetadata.Element(
name = "getTableSize",
tags = {"HELPER"},
naming = "*GetTableSize",
stdNaming = "NONE",
type = "int",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "{\nreturn @@tableSize;\n}",
thrown = {}
),
@EncodingMetadata.Element(
name = "helper",
tags = {"STATIC", "HELPER"},
naming = "*Helper",
stdNaming = "NONE",
type = "T",
typeParams = {"T: java.lang.Object & java.io.Serializable"},
params = {"param: T"},
doc = {},
annotations = {},
code = "{\nreturn @^param;\n}",
thrown = {"java.lang.Exception", "java.lang.Error"}
),
@EncodingMetadata.Element(
name = "cellSet",
tags = {"HELPER"},
naming = "*CellSet",
stdNaming = "NONE",
type = "com.google.common.collect.ImmutableSet>",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "{\nreturn @@value.cellSet();\n}",
thrown = {}
),
@EncodingMetadata.Element(
name = "DILLY_CONSTANT",
tags = {"BUILDER", "STATIC", "PRIVATE", "FINAL", "FIELD"},
naming = "*_DILLY_CONSTANT",
stdNaming = "NONE",
type = "java.lang.Object",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "\"{D}\"",
thrown = {}
),
@EncodingMetadata.Element(
name = "builder",
tags = {"BUILDER", "PRIVATE", "FINAL", "FIELD"},
naming = "*_builder",
stdNaming = "NONE",
type = "com.google.common.collect.ImmutableTable.Builder",
typeParams = {},
params = {},
doc = {},
annotations = {},
code = "com.google.common.collect.ImmutableTable.<@^R, @^C, @^V>builder()",
thrown = {}
),
@EncodingMetadata.Element(
name = "put",
tags = {"BUILDER", "INIT"},
naming = "*",
stdNaming = "PUT",
type = "void",
typeParams = {},
params = {"row: R", "column: C", "value: V"},
doc = {},
annotations = {},
code = "{\n@@builder.put(@^row, @^column, @^value);\n}",
thrown = {}
),
@EncodingMetadata.Element(
name = "putAll",
tags = {"BUILDER", "INIT", "COPY"},
naming = "*",
stdNaming = "PUT_ALL",
type = "void",
typeParams = {},
params = {"table: com.google.common.collect.Table"},
doc = {},
annotations = {},
code = "{\n@@builder.putAll(@^table);\n@@DILLY_CONSTANT.toString();// just reference constant\n}",
thrown = {}
)
}
)
public @interface TableEncodingEnabled {}