Class: Mirah::JVM::Types::Intrinsic

Inherits:
Object
  • Object
show all
Includes:
ArgumentConversion
Defined in:
lib/mirah/jvm/types/methods.rb

Direct Known Subclasses

ComparisonIntrinsic

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ArgumentConversion

#convert_args

Constructor Details

#initialize(klass, name, args, type, &block) ⇒ Intrinsic

Returns a new instance of Intrinsic.

Raises:

  • (ArgumentError)


73
74
75
76
77
78
79
80
# File 'lib/mirah/jvm/types/methods.rb', line 73

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_typesObject (readonly)

Returns the value of attribute argument_types.



71
72
73
# File 'lib/mirah/jvm/types/methods.rb', line 71

def argument_types
  @argument_types
end

#nameObject (readonly)

Returns the value of attribute name.



71
72
73
# File 'lib/mirah/jvm/types/methods.rb', line 71

def name
  @name
end

#return_typeObject (readonly)

Returns the value of attribute return_type.



71
72
73
# File 'lib/mirah/jvm/types/methods.rb', line 71

def return_type
  @return_type
end

Instance Method Details

#abstract?Boolean

Returns:

  • (Boolean)


98
99
100
# File 'lib/mirah/jvm/types/methods.rb', line 98

def abstract?
  false
end

#call(builder, ast, expression, *args) ⇒ Object



82
83
84
# File 'lib/mirah/jvm/types/methods.rb', line 82

def call(builder, ast, expression, *args)
  @block.call(builder, ast, expression, *args)
end

#constructor?Boolean

Returns:

  • (Boolean)


90
91
92
# File 'lib/mirah/jvm/types/methods.rb', line 90

def constructor?
  false
end

#declaring_classObject



86
87
88
# File 'lib/mirah/jvm/types/methods.rb', line 86

def declaring_class
  @class
end

#exceptionsObject



102
103
104
# File 'lib/mirah/jvm/types/methods.rb', line 102

def exceptions
  []
end

#field?Boolean

Returns:

  • (Boolean)


94
95
96
# File 'lib/mirah/jvm/types/methods.rb', line 94

def field?
  false
end

#varargs?Boolean

Returns:

  • (Boolean)


106
107
108
# File 'lib/mirah/jvm/types/methods.rb', line 106

def varargs?
  false
end