Class: BiteScript::ASM::FieldMirror

Inherits:
Object
  • Object
show all
Includes:
Annotated, Generics, Modifiers
Defined in:
lib/bitescript/mirror.rb,
lib/bitescript/asm3/mirror.rb

Defined Under Namespace

Classes: Builder

Instance Attribute Summary collapse

Attributes included from Modifiers

#flags

Instance Method Summary collapse

Methods included from Annotated

#addAnnotation, #annotations, #declaredAnnotations, #getDeclaredAnnotation, #inspect_annotations

Methods included from Generics

#inspect_generic, #inspect_type

Methods included from Modifiers

add_modifier

Constructor Details

#initialize(klass, flags, name, type, signature, value) ⇒ FieldMirror

Returns a new instance of FieldMirror.



393
394
395
396
397
398
399
400
# File 'lib/bitescript/mirror.rb', line 393

def initialize(klass, flags, name, type, signature, value)
  @declaring_class = klass
  @flags = flags
  @name = name
  @type = type
  @value = value
  @signature = signature
end

Instance Attribute Details

#declaring_classObject (readonly)

Returns the value of attribute declaring_class.



392
393
394
# File 'lib/bitescript/mirror.rb', line 392

def declaring_class
  @declaring_class
end

#nameObject (readonly)

Returns the value of attribute name.



392
393
394
# File 'lib/bitescript/mirror.rb', line 392

def name
  @name
end

#signatureObject (readonly)

Returns the value of attribute signature.



392
393
394
# File 'lib/bitescript/mirror.rb', line 392

def signature
  @signature
end

#typeObject (readonly)

Returns the value of attribute type.



392
393
394
# File 'lib/bitescript/mirror.rb', line 392

def type
  @type
end

#valueObject (readonly)

Returns the value of attribute value.



392
393
394
# File 'lib/bitescript/mirror.rb', line 392

def value
  @value
end

Instance Method Details

#generic_typeObject



402
403
404
# File 'lib/bitescript/mirror.rb', line 402

def generic_type
  signature
end

#inspectObject



406
407
408
409
# File 'lib/bitescript/mirror.rb', line 406

def inspect
  typename = inspect_generic(type, signature)
  inspect_annotations + "#{modifier_string}#{typename} #{name};"
end