java

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeneratedType

type GeneratedType struct {
	GeneratedDef string
}

type JavaExprGenerator

type JavaExprGenerator struct {
	*gen.GenExprDispatcher
	GenType          func(definition.Type) (string, error)
	ValueStr         string
	LiteralGenerator gen.LiteralGeneratorImpl // optional
}

func NewJavaExprGenerator

func NewJavaExprGenerator(genType func(definition.Type) (string, error), valueStr string) *JavaExprGenerator

func (JavaExprGenerator) GenerateBinopExpr

func (g JavaExprGenerator) GenerateBinopExpr(expr *definition.BinopExpr) (string, error)

func (JavaExprGenerator) GenerateCastExpr

func (g JavaExprGenerator) GenerateCastExpr(expr *definition.CastExpr) (string, error)

func (JavaExprGenerator) GenerateConstantExpr

func (g JavaExprGenerator) GenerateConstantExpr(expr *definition.ConstantExpr) (string, error)

func (JavaExprGenerator) GenerateExpr

func (g JavaExprGenerator) GenerateExpr(expr definition.Expr) (string, error)

func (JavaExprGenerator) GenerateRawExpr

func (g JavaExprGenerator) GenerateRawExpr(expr *definition.RawExpr) (string, error)

func (JavaExprGenerator) GenerateTenaryExpr

func (g JavaExprGenerator) GenerateTenaryExpr(expr *definition.TenaryExpr) (string, error)

func (JavaExprGenerator) GenerateUnopExpr

func (g JavaExprGenerator) GenerateUnopExpr(expr *definition.UnopExpr) (string, error)

func (JavaExprGenerator) GenerateValueExpr

func (g JavaExprGenerator) GenerateValueExpr(expr *definition.ValueExpr) (string, error)

type JavaGenerator

type JavaGenerator struct {
	*gen.GenDispatcher
	GenCtx   *gen.GenCtx
	GenTypes *util.OrderedMap[string, *GeneratedType]
	GenStack *util.OrderedMap[string, any]
	Warning  definition.TopLevelWarning
}

func NewJavaGenerator

func NewJavaGenerator() *JavaGenerator

func (*JavaGenerator) Generate

func (g *JavaGenerator) Generate(ctx *gen.GenCtx) (retErr error, retWarnings error)

func (JavaGenerator) GenerateArray

func (g JavaGenerator) GenerateArray(array *definition.Array) (string, error)

func (JavaGenerator) GenerateArrayDefaultValue

func (g JavaGenerator) GenerateArrayDefaultValue(array *definition.Array) (string, error)

func (JavaGenerator) GenerateBasicType

func (g JavaGenerator) GenerateBasicType(type_ *definition.BasicType) (string, error)

func (JavaGenerator) GenerateBasicTypeDefaultValue

func (g JavaGenerator) GenerateBasicTypeDefaultValue(type_ *definition.BasicType) (string, error)

func (JavaGenerator) GenerateBytes

func (g JavaGenerator) GenerateBytes(bytes *definition.Bytes) (string, error)

func (JavaGenerator) GenerateBytesDefaultValue

func (g JavaGenerator) GenerateBytesDefaultValue(bytes *definition.Bytes) (string, error)

func (JavaGenerator) GenerateConstantField

func (g JavaGenerator) GenerateConstantField(field *definition.ConstantField) (string, error)

func (JavaGenerator) GenerateCustomGetter

func (g JavaGenerator) GenerateCustomGetter(method *definition.GetMethod) (string, error)

func (JavaGenerator) GenerateCustomGetterDecl

func (g JavaGenerator) GenerateCustomGetterDecl(method *definition.GetMethod) (string, error)

func (JavaGenerator) GenerateCustomSetter

func (g JavaGenerator) GenerateCustomSetter(method *definition.SetMethod) (string, error)

func (JavaGenerator) GenerateCustomSetterDecl

func (g JavaGenerator) GenerateCustomSetterDecl(method *definition.SetMethod) (string, error)

func (JavaGenerator) GenerateDecoder

func (g JavaGenerator) GenerateDecoder(structDef *definition.Struct) (string, error)

func (JavaGenerator) GenerateDefaultGetter

func (g JavaGenerator) GenerateDefaultGetter(method *definition.GetMethod) (string, error)

func (JavaGenerator) GenerateDefaultGetterDecl

func (g JavaGenerator) GenerateDefaultGetterDecl(method *definition.GetMethod) (string, error)

func (JavaGenerator) GenerateDefaultSetter

func (g JavaGenerator) GenerateDefaultSetter(method *definition.SetMethod) (string, error)

func (JavaGenerator) GenerateDefaultSetterDecl

func (g JavaGenerator) GenerateDefaultSetterDecl(method *definition.SetMethod) (string, error)

func (JavaGenerator) GenerateEmbeddedField

func (g JavaGenerator) GenerateEmbeddedField(field *definition.EmbeddedField) (string, error)

func (JavaGenerator) GenerateEncoder

func (g JavaGenerator) GenerateEncoder(structDef *definition.Struct) (string, error)

func (JavaGenerator) GenerateEnum

func (g JavaGenerator) GenerateEnum(enumDef *definition.Enum) (string, error)

func (JavaGenerator) GenerateEnumDefaultValue

func (g JavaGenerator) GenerateEnumDefaultValue(enumDef *definition.Enum) (string, error)

func (JavaGenerator) GenerateExpr

func (g JavaGenerator) GenerateExpr(expr definition.Expr, valueStr string) (string, error)

func (JavaGenerator) GenerateField

func (g JavaGenerator) GenerateField(field definition.Field) (string, error)

func (JavaGenerator) GenerateMethod

func (g JavaGenerator) GenerateMethod(method definition.Method) (string, error)

func (JavaGenerator) GenerateMethodDecl

func (g JavaGenerator) GenerateMethodDecl(method definition.Method) (string, error)

func (JavaGenerator) GenerateNormalField

func (g JavaGenerator) GenerateNormalField(field *definition.NormalField) (string, error)

func (JavaGenerator) GenerateRawGetter

func (g JavaGenerator) GenerateRawGetter(field definition.Field) (string, error)

func (JavaGenerator) GenerateRawGetterDecl

func (g JavaGenerator) GenerateRawGetterDecl(field definition.Field) (string, error)

func (JavaGenerator) GenerateRawSetter

func (g JavaGenerator) GenerateRawSetter(field definition.Field) (string, error)

func (JavaGenerator) GenerateRawSetterDecl

func (g JavaGenerator) GenerateRawSetterDecl(field definition.Field) (string, error)

func (JavaGenerator) GenerateString

func (g JavaGenerator) GenerateString(string_ *definition.String) (string, error)

func (JavaGenerator) GenerateStringDefaultValue

func (g JavaGenerator) GenerateStringDefaultValue(string_ *definition.String) (string, error)

func (JavaGenerator) GenerateStruct

func (g JavaGenerator) GenerateStruct(structDef *definition.Struct) (string, error)

func (JavaGenerator) GenerateStructDefaultValue

func (g JavaGenerator) GenerateStructDefaultValue(structDef *definition.Struct) (string, error)

func (JavaGenerator) GenerateType

func (g JavaGenerator) GenerateType(type_ definition.Type) (string, error)

func (JavaGenerator) GenerateTypeDefaultValue

func (g JavaGenerator) GenerateTypeDefaultValue(type_ definition.Type) (string, error)

func (JavaGenerator) GenerateUnit

func (g JavaGenerator) GenerateUnit(unit *definition.CompilationUnit) error

func (JavaGenerator) GenerateVoidField

func (g JavaGenerator) GenerateVoidField(field *definition.VoidField) (string, error)

type JavaLiteralGenerator

type JavaLiteralGenerator struct {
	*gen.GenLiteralDispatcher
}

func NewJavaLiteralGenerator

func NewJavaLiteralGenerator() *JavaLiteralGenerator

func (JavaLiteralGenerator) GenerateBoolLiteral

func (g JavaLiteralGenerator) GenerateBoolLiteral(literal *definition.BoolLiteral) (string, error)

func (JavaLiteralGenerator) GenerateFloatLiteral

func (g JavaLiteralGenerator) GenerateFloatLiteral(literal *definition.FloatLiteral) (string, error)

func (JavaLiteralGenerator) GenerateIntLiteral

func (g JavaLiteralGenerator) GenerateIntLiteral(literal *definition.IntLiteral) (string, error)

func (JavaLiteralGenerator) GenerateLiteral

func (g JavaLiteralGenerator) GenerateLiteral(literal definition.Literal) (string, error)

func (JavaLiteralGenerator) GenerateStringLiteral

func (g JavaLiteralGenerator) GenerateStringLiteral(literal *definition.StringLiteral) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL