Class: Java::JavaClass
- Inherits:
-
Object
- Object
- Java::JavaClass
- Defined in:
- lib/javaobs.rb
Overview
The Java meta class with all the information needed for serialization of the Ruby class to the stream. This class is attached to the Ruby class.
Instance Attribute Summary collapse
-
#arrayType ⇒ Object
readonly
Returns the value of attribute arrayType.
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#flags ⇒ Object
readonly
Returns the value of attribute flags.
-
#javaName ⇒ Object
readonly
Returns the value of attribute javaName.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#rubyClass ⇒ Object
Returns the value of attribute rubyClass.
-
#superClass ⇒ Object
Returns the value of attribute superClass.
-
#uid ⇒ Object
readonly
Returns the value of attribute uid.
Instance Method Summary collapse
-
#addField(field) ⇒ Object
Add a field to the class.
-
#initialize(name, uid, flags) ⇒ JavaClass
constructor
A new instance of JavaClass.
- #to_s ⇒ Object
Constructor Details
#initialize(name, uid, flags) ⇒ JavaClass
Returns a new instance of JavaClass.
80 81 82 83 84 85 86 87 88 |
# File 'lib/javaobs.rb', line 80 def initialize(name, uid, flags) @name = @javaName = name ind = name.rindex('.') @name = name.slice(ind + 1..name.length) if ind @flags = flags @uid = uid @fields = [] @arrayType = name[1] if name[0] == ?[ end |
Instance Attribute Details
#arrayType ⇒ Object (readonly)
Returns the value of attribute arrayType.
78 79 80 |
# File 'lib/javaobs.rb', line 78 def arrayType @arrayType end |
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
78 79 80 |
# File 'lib/javaobs.rb', line 78 def fields @fields end |
#flags ⇒ Object (readonly)
Returns the value of attribute flags.
78 79 80 |
# File 'lib/javaobs.rb', line 78 def flags @flags end |
#javaName ⇒ Object (readonly)
Returns the value of attribute javaName.
78 79 80 |
# File 'lib/javaobs.rb', line 78 def javaName @javaName end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
78 79 80 |
# File 'lib/javaobs.rb', line 78 def name @name end |
#rubyClass ⇒ Object
Returns the value of attribute rubyClass.
77 78 79 |
# File 'lib/javaobs.rb', line 77 def rubyClass @rubyClass end |
#superClass ⇒ Object
Returns the value of attribute superClass.
77 78 79 |
# File 'lib/javaobs.rb', line 77 def superClass @superClass end |
#uid ⇒ Object (readonly)
Returns the value of attribute uid.
78 79 80 |
# File 'lib/javaobs.rb', line 78 def uid @uid end |
Instance Method Details
#addField(field) ⇒ Object
Add a field to the class.
91 92 93 |
# File 'lib/javaobs.rb', line 91 def addField(field) @fields << field end |
#to_s ⇒ Object
95 96 97 |
# File 'lib/javaobs.rb', line 95 def to_s @name end |