Class: BiteScript::ASM::MethodMirror
- Inherits:
-
Object
- Object
- BiteScript::ASM::MethodMirror
- Defined in:
- lib/bitescript/mirror.rb,
lib/bitescript/asm3/mirror.rb
Defined Under Namespace
Classes: Builder
Instance Attribute Summary collapse
-
#argument_types ⇒ Object
readonly
Returns the value of attribute argument_types.
-
#declaring_class ⇒ Object
readonly
Returns the value of attribute declaring_class.
-
#exception_types ⇒ Object
readonly
Returns the value of attribute exception_types.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#return_type ⇒ Object
readonly
Returns the value of attribute return_type.
-
#signature ⇒ Object
readonly
Returns the value of attribute signature.
Attributes included from Modifiers
Instance Method Summary collapse
- #generic_exception_types ⇒ Object
- #generic_parameter_types ⇒ Object
- #generic_return_type ⇒ Object
-
#initialize(klass, flags, return_type, name, parameters, exceptions, signature) ⇒ MethodMirror
constructor
A new instance of MethodMirror.
- #inspect ⇒ Object
- #type_parameters ⇒ Object
Methods included from Generics
#inspect_generic, #inspect_type
Methods included from Annotated
#addAnnotation, #annotations, #declaredAnnotations, #getDeclaredAnnotation, #inspect_annotations
Methods included from Modifiers
Constructor Details
#initialize(klass, flags, return_type, name, parameters, exceptions, signature) ⇒ MethodMirror
Returns a new instance of MethodMirror.
435 436 437 438 439 440 441 442 443 |
# File 'lib/bitescript/mirror.rb', line 435 def initialize(klass, flags, return_type, name, parameters, exceptions, signature) @flags = flags @declaring_class = klass @name = name @return_type = return_type @argument_types = parameters @exception_types = exceptions @signature = signature end |
Instance Attribute Details
#argument_types ⇒ Object (readonly)
Returns the value of attribute argument_types.
433 434 435 |
# File 'lib/bitescript/mirror.rb', line 433 def argument_types @argument_types end |
#declaring_class ⇒ Object (readonly)
Returns the value of attribute declaring_class.
432 433 434 |
# File 'lib/bitescript/mirror.rb', line 432 def declaring_class @declaring_class end |
#exception_types ⇒ Object (readonly)
Returns the value of attribute exception_types.
433 434 435 |
# File 'lib/bitescript/mirror.rb', line 433 def exception_types @exception_types end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
432 433 434 |
# File 'lib/bitescript/mirror.rb', line 432 def name @name end |
#return_type ⇒ Object (readonly)
Returns the value of attribute return_type.
432 433 434 |
# File 'lib/bitescript/mirror.rb', line 432 def return_type @return_type end |
#signature ⇒ Object (readonly)
Returns the value of attribute signature.
433 434 435 |
# File 'lib/bitescript/mirror.rb', line 433 def signature @signature end |
Instance Method Details
#generic_exception_types ⇒ Object
453 454 455 |
# File 'lib/bitescript/mirror.rb', line 453 def generic_exception_types signature.exception_types if signature end |
#generic_parameter_types ⇒ Object
445 446 447 |
# File 'lib/bitescript/mirror.rb', line 445 def generic_parameter_types signature.parameter_types if signature end |
#generic_return_type ⇒ Object
449 450 451 |
# File 'lib/bitescript/mirror.rb', line 449 def generic_return_type signature.return_type if signature end |
#inspect ⇒ Object
461 462 463 464 465 466 467 468 469 470 471 |
# File 'lib/bitescript/mirror.rb', line 461 def inspect typevars = "<#{type_parameters.map{|p| p.to_s}.join ', '}> " if type_parameters && type_parameters.size != 0 "%s%s%s%s %s(%s);" % [ inspect_annotations, modifier_string, typevars, inspect_generic(return_type, generic_return_type), name, (generic_parameter_types || argument_types).map {|x| inspect_type(x)}.join(', '), ] end |
#type_parameters ⇒ Object
457 458 459 |
# File 'lib/bitescript/mirror.rb', line 457 def type_parameters signature.type_parameters if signature end |