Class: Mirah::JVM::Types::MirahMember

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass, name, args, return_type, static, exceptions) ⇒ MirahMember

Returns a new instance of MirahMember.



493
494
495
496
497
498
499
500
501
502
503
# File 'lib/mirah/jvm/types/methods.rb', line 493

def initialize(klass, name, args, return_type, static, exceptions)
  if return_type.name == 'void' || return_type.name == ':unreachable'
    return_type = nil
  end
  @declaring_class = klass
  @name = name
  @argument_types = args
  @return_type = return_type
  @static = static
  @exception_types = exceptions || []
end

Instance Attribute Details

#argument_typesObject (readonly)

Returns the value of attribute argument_types.



490
491
492
# File 'lib/mirah/jvm/types/methods.rb', line 490

def argument_types
  @argument_types
end

#declaring_classObject (readonly)

Returns the value of attribute declaring_class.



490
491
492
# File 'lib/mirah/jvm/types/methods.rb', line 490

def declaring_class
  @declaring_class
end

#exception_typesObject (readonly)

Returns the value of attribute exception_types.



491
492
493
# File 'lib/mirah/jvm/types/methods.rb', line 491

def exception_types
  @exception_types
end

#nameObject (readonly)

Returns the value of attribute name.



490
491
492
# File 'lib/mirah/jvm/types/methods.rb', line 490

def name
  @name
end

#return_typeObject (readonly)

Returns the value of attribute return_type.



490
491
492
# File 'lib/mirah/jvm/types/methods.rb', line 490

def return_type
  @return_type
end

Instance Method Details

#abstract?Boolean

Returns:

  • (Boolean)


509
510
511
# File 'lib/mirah/jvm/types/methods.rb', line 509

def abstract?
  @declaring_class.interface?
end

#isVarargObject



517
518
519
# File 'lib/mirah/jvm/types/methods.rb', line 517

def isVararg
  varargs?
end

#static?Boolean

Returns:

  • (Boolean)


505
506
507
# File 'lib/mirah/jvm/types/methods.rb', line 505

def static?
  @static
end

#varargs?Boolean

Returns:

  • (Boolean)


513
514
515
# File 'lib/mirah/jvm/types/methods.rb', line 513

def varargs?
  false
end