class GraphQLJavaGen::Scalar

Constants

WRAPPER_OBJECT

Attributes

imports[R]
type_name[R]

Public Class Methods

new(type_name:, java_type:, deserialize_expr:, imports: []) click to toggle source
# File codegen/lib/graphql_java_gen/scalar.rb, line 14
def initialize(type_name:, java_type:, deserialize_expr:, imports: [])
  @type_name = type_name
  @java_type = java_type
  @deserialize_expr = deserialize_expr
  @imports = imports
end

Public Instance Methods

deserialize(expr) click to toggle source
# File codegen/lib/graphql_java_gen/scalar.rb, line 29
def deserialize(expr)
  @deserialize_expr.call(expr)
end
non_nullable_type() click to toggle source
# File codegen/lib/graphql_java_gen/scalar.rb, line 25
def non_nullable_type
  @java_type
end
nullable_type() click to toggle source
# File codegen/lib/graphql_java_gen/scalar.rb, line 21
def nullable_type
  WRAPPER_OBJECT[@java_type]
end