Class: JavaClass::Constant
- Inherits:
-
Object
- Object
- JavaClass::Constant
- Includes:
- Base
- Defined in:
- lib/javaclass/constant.rb
Overview
Constantの基底クラス
Direct Known Subclasses
ClassConstant, DoubleConstant, FloatConstant, IntegerConstant, LongConstant, MemberRefConstant, NameAndTypeConstant, StringConstant, UTF8Constant
Constant Summary collapse
- CONSTANT_Class =
7
- CONSTANT_Fieldref =
9
- CONSTANT_Methodref =
10
- CONSTANT_InterfaceMethodref =
11
- CONSTANT_String =
8
- CONSTANT_Integer =
3
- CONSTANT_Float =
4
- CONSTANT_Long =
5
- CONSTANT_Double =
6
- CONSTANT_NameAndType =
12
- CONSTANT_Utf8 =
1
Instance Attribute Summary collapse
-
#java_class ⇒ Object
Returns the value of attribute java_class.
-
#tag ⇒ Object
Returns the value of attribute tag.
Instance Method Summary collapse
-
#initialize(java_class, tag = nil) ⇒ Constant
constructor
コンストラクタ.
- #to_bytes ⇒ Object
Methods included from Base
#==, #===, #dump, #eql?, #hash, #to_byte
Constructor Details
#initialize(java_class, tag = nil) ⇒ Constant
コンストラクタ
*java_class::constantの所有者であるJavaクラス *tag::constantの種類を示すタグ
29 30 31 32 |
# File 'lib/javaclass/constant.rb', line 29 def initialize( java_class, tag=nil ) @java_class = java_class @tag = tag end |
Instance Attribute Details
#java_class ⇒ Object
Returns the value of attribute java_class.
39 40 41 |
# File 'lib/javaclass/constant.rb', line 39 def java_class @java_class end |
#tag ⇒ Object
Returns the value of attribute tag.
38 39 40 |
# File 'lib/javaclass/constant.rb', line 38 def tag @tag end |
Instance Method Details
#to_bytes ⇒ Object
34 35 36 |
# File 'lib/javaclass/constant.rb', line 34 def to_bytes() to_byte( @tag, 1) end |