Class: Duby::JVM::Types::MetaType

Inherits:
Type show all
Defined in:
lib/duby/jvm/types.rb

Direct Known Subclasses

TypeDefMeta

Constant Summary

Constants included from MethodLookup

MethodLookup::BOOLEAN, MethodLookup::BYTE, MethodLookup::CHAR, MethodLookup::DOUBLE, MethodLookup::FLOAT, MethodLookup::INT, MethodLookup::LONG, MethodLookup::PrimitiveConversions, MethodLookup::SHORT

Constants inherited from AST::TypeReference

AST::TypeReference::ErrorType, AST::TypeReference::NoType, AST::TypeReference::NullType, AST::TypeReference::UnreachableType

Instance Attribute Summary collapse

Attributes inherited from AST::TypeReference

#array

Attributes included from AST::Named

#name

Attributes inherited from AST::Node

#children, #inferred_type, #newline, #parent, #position

Instance Method Summary collapse

Methods inherited from Type

#add_intrinsics, #add_method, #aload, #array?, #array_type, #assignable_from?, #astore, #compatible?, #component_type, #constructor, #declared_class_methods, #declared_instance_methods, #declared_intrinsics, #get_method, #init_value, #inspect, #interface?, #intrinsics, #is_parent, #iterable?, #java_method, #load, #newarray, #prefix, #primitive?, #return, #store, #to_source, #void?, #wide?

Methods included from MethodLookup

#each_is_exact, #each_is_exact_or_subtype_or_convertible, #find_jls, #find_method, #is_more_specific?, #log, #phase1, #phase2, #phase3, #primitive_convertible?

Methods inherited from AST::TypeReference

#==, #compatible?, #component_type, #eql?, #error?, #hash, #is_parent, #iterable?, #narrow, #primitive?, #to_s, #unreachable?

Methods included from AST::Named

#to_s

Methods inherited from AST::Node

#[], #each, #expr?, #inspect, #line_number, #log, #precompile, #resolve_if, #resolved!, #resolved?, #simple_name, #temp, #to_s

Constructor Details

#initialize(unmeta) ⇒ MetaType

Returns a new instance of MetaType.



175
176
177
178
# File 'lib/duby/jvm/types.rb', line 175

def initialize(unmeta)
  @name = unmeta.name
  @unmeta = unmeta
end

Instance Attribute Details

#unmetaObject (readonly)

Returns the value of attribute unmeta.



173
174
175
# File 'lib/duby/jvm/types.rb', line 173

def unmeta
  @unmeta
end

Instance Method Details

#basic_typeObject



180
181
182
# File 'lib/duby/jvm/types.rb', line 180

def basic_type
  @unmeta.basic_type
end

#interfacesObject



196
197
198
# File 'lib/duby/jvm/types.rb', line 196

def interfaces
  []
end

#jvm_typeObject



200
201
202
# File 'lib/duby/jvm/types.rb', line 200

def jvm_type
  unmeta.jvm_type
end

#metaObject



188
189
190
# File 'lib/duby/jvm/types.rb', line 188

def meta
  self
end

#meta?Boolean

Returns:



184
185
186
# File 'lib/duby/jvm/types.rb', line 184

def meta?
  true
end

#superclassObject



192
193
194
# File 'lib/duby/jvm/types.rb', line 192

def superclass
  @unmeta.superclass.meta if @unmeta.superclass
end