Class: Mirah::JVM::Types::JavaFieldGetter
- Inherits:
-
JavaFieldAccessor
- Object
- JavaCallable
- JavaConstructor
- JavaMethod
- JavaFieldAccessor
- Mirah::JVM::Types::JavaFieldGetter
- Defined in:
- lib/mirah/jvm/types/methods.rb
Instance Attribute Summary
Attributes inherited from JavaCallable
Instance Method Summary collapse
Methods inherited from JavaFieldAccessor
#field?, #final?, #public?, #return_type
Methods inherited from JavaMethod
#abstract?, #call_special, #constructor?, #return_type, #static?, #type_parameters, #void?
Methods inherited from JavaConstructor
#constructor?, #declaring_class, #exceptions, #return_type, #type_parameters, #varargs?
Methods inherited from JavaCallable
#field?, #initialize, #name, #parameter_types
Methods included from ArgumentConversion
Constructor Details
This class inherits a constructor from Mirah::JVM::Types::JavaCallable
Instance Method Details
#argument_types ⇒ Object
400 401 402 |
# File 'lib/mirah/jvm/types/methods.rb', line 400 def argument_types [] end |
#call(compiler, ast, expression, parameters = nil) ⇒ Object
404 405 406 407 408 409 410 411 412 413 414 415 416 417 |
# File 'lib/mirah/jvm/types/methods.rb', line 404 def call(compiler, ast, expression, parameters=nil) target = compiler.inferred_type(ast.target) # TODO: assert that no args are being passed, though that should have failed lookup if expression if @member.static? compiler.method.getstatic(target, name, @member.type) else compiler.visit(ast.target, true) compiler.method.getfield(target, name, @member.type) end end end |