Class: Java::JavaField

Inherits:
Object
  • Object
show all
Defined in:
lib/javaobs.rb

Overview

An representation of a Java instance variable used to serialize data to and from a stream.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, type) ⇒ JavaField

Create a java instance variable with a name and data type.



62
63
64
65
66
# File 'lib/javaobs.rb', line 62

def initialize(name, type)
  @name = name
  @type = type
  @subtype = nil
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



58
59
60
# File 'lib/javaobs.rb', line 58

def name
  @name
end

#subtypeObject

Returns the value of attribute subtype.



59
60
61
# File 'lib/javaobs.rb', line 59

def subtype
  @subtype
end

#typeObject (readonly)

Returns the value of attribute type.



58
59
60
# File 'lib/javaobs.rb', line 58

def type
  @type
end

Instance Method Details

#inspectObject



68
69
70
# File 'lib/javaobs.rb', line 68

def inspect
  "<JavaField: #{@name}:#{@type.chr}:#{@subtype}>"
end