Class: Duby::JVM::Types::Intrinsic
- Inherits:
-
Object
- Object
- Duby::JVM::Types::Intrinsic
- Includes:
- ArgumentConversion
- Defined in:
- lib/duby/jvm/types/methods.rb
Instance Attribute Summary collapse
-
#argument_types ⇒ Object
readonly
Returns the value of attribute argument_types.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#return_type ⇒ Object
readonly
Returns the value of attribute return_type.
Instance Method Summary collapse
- #abstract? ⇒ Boolean
- #actual_return_type ⇒ Object
- #call(builder, ast, expression) ⇒ Object
- #constructor? ⇒ Boolean
- #declaring_class ⇒ Object
- #exceptions ⇒ Object
-
#initialize(klass, name, args, type, &block) ⇒ Intrinsic
constructor
A new instance of Intrinsic.
Methods included from ArgumentConversion
Constructor Details
#initialize(klass, name, args, type, &block) ⇒ Intrinsic
Returns a new instance of Intrinsic.
36 37 38 39 40 41 42 43 |
# File 'lib/duby/jvm/types/methods.rb', line 36 def initialize(klass, name, args, type, &block) raise ArgumentError, "Block required" unless block_given? @class = klass @name = name @argument_types = args @return_type = type @block = block end |
Instance Attribute Details
#argument_types ⇒ Object (readonly)
Returns the value of attribute argument_types.
34 35 36 |
# File 'lib/duby/jvm/types/methods.rb', line 34 def argument_types @argument_types end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
34 35 36 |
# File 'lib/duby/jvm/types/methods.rb', line 34 def name @name end |
#return_type ⇒ Object (readonly)
Returns the value of attribute return_type.
34 35 36 |
# File 'lib/duby/jvm/types/methods.rb', line 34 def return_type @return_type end |
Instance Method Details
#abstract? ⇒ Boolean
57 58 59 |
# File 'lib/duby/jvm/types/methods.rb', line 57 def abstract? false end |
#actual_return_type ⇒ Object
65 66 67 |
# File 'lib/duby/jvm/types/methods.rb', line 65 def actual_return_type return_type end |
#call(builder, ast, expression) ⇒ Object
45 46 47 |
# File 'lib/duby/jvm/types/methods.rb', line 45 def call(builder, ast, expression) @block.call(builder, ast, expression) end |
#constructor? ⇒ Boolean
53 54 55 |
# File 'lib/duby/jvm/types/methods.rb', line 53 def constructor? false end |
#declaring_class ⇒ Object
49 50 51 |
# File 'lib/duby/jvm/types/methods.rb', line 49 def declaring_class @class end |
#exceptions ⇒ Object
61 62 63 |
# File 'lib/duby/jvm/types/methods.rb', line 61 def exceptions [] end |