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.



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

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



54
55
56
# File 'lib/javaobs.rb', line 54

def name
  @name
end

#subtypeObject

Returns the value of attribute subtype.



55
56
57
# File 'lib/javaobs.rb', line 55

def subtype
  @subtype
end

#typeObject (readonly)

Returns the value of attribute type.



54
55
56
# File 'lib/javaobs.rb', line 54

def type
  @type
end

Instance Method Details

#inspectObject



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

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