Class: Mirah::JVM::Types::Intrinsic
- Inherits:
-
Object
- Object
- Mirah::JVM::Types::Intrinsic
show all
- Includes:
- ArgumentConversion
- Defined in:
- lib/mirah/jvm/types/methods.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
#convert_args
Constructor Details
#initialize(klass, name, args, type, kind = nil, &block) ⇒ Intrinsic
Returns a new instance of Intrinsic.
79
80
81
82
83
84
85
86
87
|
# File 'lib/mirah/jvm/types/methods.rb', line 79
def initialize(klass, name, args, type, kind=nil, &block)
raise ArgumentError, "Block required" unless block_given?
@class = klass
@name = name
@argument_types = args
@return_type = type
@block = block
@kind = kind
end
|
Instance Attribute Details
#argument_types ⇒ Object
Returns the value of attribute argument_types.
77
78
79
|
# File 'lib/mirah/jvm/types/methods.rb', line 77
def argument_types
@argument_types
end
|
#name ⇒ Object
Returns the value of attribute name.
77
78
79
|
# File 'lib/mirah/jvm/types/methods.rb', line 77
def name
@name
end
|
#return_type ⇒ Object
Returns the value of attribute return_type.
77
78
79
|
# File 'lib/mirah/jvm/types/methods.rb', line 77
def return_type
@return_type
end
|
Instance Method Details
#abstract? ⇒ Boolean
114
115
116
|
# File 'lib/mirah/jvm/types/methods.rb', line 114
def abstract?
false
end
|
#accept(visitor, expression) ⇒ Object
93
94
95
96
|
# File 'lib/mirah/jvm/types/methods.rb', line 93
def accept(visitor, expression)
name = "visit_#{@kind.downcase}".sub(/_op$/,"")
visitor.send(name, self, expression)
end
|
#call(builder, ast, expression, *args) ⇒ Object
98
99
100
|
# File 'lib/mirah/jvm/types/methods.rb', line 98
def call(builder, ast, expression, *args)
@block.call(builder, ast, expression, *args)
end
|
#constructor? ⇒ Boolean
106
107
108
|
# File 'lib/mirah/jvm/types/methods.rb', line 106
def constructor?
false
end
|
#declaring_class ⇒ Object
102
103
104
|
# File 'lib/mirah/jvm/types/methods.rb', line 102
def declaring_class
@class
end
|
#exceptions ⇒ Object
118
119
120
|
# File 'lib/mirah/jvm/types/methods.rb', line 118
def exceptions
[]
end
|
#field? ⇒ Boolean
110
111
112
|
# File 'lib/mirah/jvm/types/methods.rb', line 110
def field?
false
end
|
#isVararg ⇒ Object
126
127
128
|
# File 'lib/mirah/jvm/types/methods.rb', line 126
def isVararg
varargs?
end
|
#kind ⇒ Object
89
90
91
|
# File 'lib/mirah/jvm/types/methods.rb', line 89
def kind
Java::OrgMirahJvmTypes::MemberKind.const_get(@kind)
end
|
#varargs? ⇒ Boolean
122
123
124
|
# File 'lib/mirah/jvm/types/methods.rb', line 122
def varargs?
false
end
|