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.
76 77 78 79 80 81 82 83 84 |
# File 'lib/javaobs.rb', line 76 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.
74 75 76 |
# File 'lib/javaobs.rb', line 74 def arrayType @arrayType end |
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
74 75 76 |
# File 'lib/javaobs.rb', line 74 def fields @fields end |
#flags ⇒ Object (readonly)
Returns the value of attribute flags.
74 75 76 |
# File 'lib/javaobs.rb', line 74 def flags @flags end |
#javaName ⇒ Object (readonly)
Returns the value of attribute javaName.
74 75 76 |
# File 'lib/javaobs.rb', line 74 def javaName @javaName end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
74 75 76 |
# File 'lib/javaobs.rb', line 74 def name @name end |
#rubyClass ⇒ Object
Returns the value of attribute rubyClass.
73 74 75 |
# File 'lib/javaobs.rb', line 73 def rubyClass @rubyClass end |
#superClass ⇒ Object
Returns the value of attribute superClass.
73 74 75 |
# File 'lib/javaobs.rb', line 73 def superClass @superClass end |
#uid ⇒ Object (readonly)
Returns the value of attribute uid.
74 75 76 |
# File 'lib/javaobs.rb', line 74 def uid @uid end |
Instance Method Details
#addField(field) ⇒ Object
Add a field to the class.
87 88 89 |
# File 'lib/javaobs.rb', line 87 def addField(field) @fields << field end |
#to_s ⇒ Object
91 92 93 |
# File 'lib/javaobs.rb', line 91 def to_s @name end |