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 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.
396 397 398 399 400 401 402 403 |
# File 'lib/bitescript/mirror.rb', line 396 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 end |
Instance Attribute Details
#argument_types ⇒ Object (readonly)
Returns the value of attribute argument_types.
394 395 396 |
# File 'lib/bitescript/mirror.rb', line 394 def argument_types @argument_types end |
#declaring_class ⇒ Object (readonly)
Returns the value of attribute declaring_class.
393 394 395 |
# File 'lib/bitescript/mirror.rb', line 393 def declaring_class @declaring_class end |
#exception_types ⇒ Object (readonly)
Returns the value of attribute exception_types.
394 395 396 |
# File 'lib/bitescript/mirror.rb', line 394 def exception_types @exception_types end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
393 394 395 |
# File 'lib/bitescript/mirror.rb', line 393 def name @name end |
#return_type ⇒ Object (readonly)
Returns the value of attribute return_type.
393 394 395 |
# File 'lib/bitescript/mirror.rb', line 393 def return_type @return_type end |
#signature ⇒ Object (readonly)
Returns the value of attribute signature.
394 395 396 |
# File 'lib/bitescript/mirror.rb', line 394 def signature @signature end |
Instance Method Details
#generic_exception_types ⇒ Object
413 414 415 |
# File 'lib/bitescript/mirror.rb', line 413 def generic_exception_types signature.exception_types if signature end |
#generic_parameter_types ⇒ Object
405 406 407 |
# File 'lib/bitescript/mirror.rb', line 405 def generic_parameter_types signature.parameter_types if signature end |
#generic_return_type ⇒ Object
409 410 411 |
# File 'lib/bitescript/mirror.rb', line 409 def generic_return_type signature.return_type if signature end |
#inspect ⇒ Object
421 422 423 424 425 426 427 428 429 |
# File 'lib/bitescript/mirror.rb', line 421 def inspect "%s%s%s %s(%s);" % [ inspect_annotations, modifier_string, return_type.class_name, name, argument_types.map {|x| x.class_name}.join(', '), ] end |
#type_parameters ⇒ Object
417 418 419 |
# File 'lib/bitescript/mirror.rb', line 417 def type_parameters signature.type_parameters is signature end |