Class: Duby::JVM::Types::DynamicType
- Inherits:
-
Type
- Object
- AST::Node
- AST::TypeReference
- Type
- Duby::JVM::Types::DynamicType
- Defined in:
- lib/duby/jvm/types.rb
Constant Summary collapse
Constants inherited from AST::TypeReference
AST::TypeReference::BlockType, AST::TypeReference::ErrorType, AST::TypeReference::NoType, AST::TypeReference::NullType, AST::TypeReference::UnreachableType
Instance Attribute Summary
Attributes inherited from Type
Attributes inherited from AST::TypeReference
Attributes included from AST::Named
Attributes inherited from AST::Node
#children, #inferred_type, #newline, #parent, #position
Instance Method Summary collapse
- #assignable_from?(other) ⇒ Boolean
- #basic_type ⇒ Object
- #dynamic? ⇒ Boolean
-
#initialize ⇒ DynamicType
constructor
A new instance of DynamicType.
- #is_parent(other) ⇒ Object
- #jvm_type ⇒ Object
Methods inherited from Type
#add_enumerable_macros, #add_intrinsics, #add_macro, #add_method, #aload, #array?, #array_type, #astore, #compatible?, #component_type, #constructor, #declared_class_methods, #declared_constructors, #declared_instance_methods, #declared_intrinsics, #expand_each, #field_getter, #field_setter, #get_method, #init_value, #inner_class?, #inner_class_getter, #inspect, #interface?, #interfaces, #intrinsics, #iterable?, #java_method, #load, #log, #meta, #meta?, #newarray, #prefix, #primitive?, #return, #store, #superclass, #to_source, #unmeta, #void?, #wide?
Methods included from MethodLookup
#each_is_exact, #each_is_exact_or_subtype_or_convertible, #field_lookup, #find_jls, #find_method, #inner_class, #is_more_specific?, #log, #phase1, #phase2, #phase3, #primitive_convertible?
Methods inherited from AST::TypeReference
#==, #block?, #compatible?, #component_type, #eql?, #error?, #hash, #iterable?, #meta?, #narrow, #null?, #primitive?, #to_s, #unmeta, #unreachable?
Methods included from AST::Named
Methods inherited from AST::Node
#<<, ===, #[], #_set_parent, child, child_name, #each, #empty?, #expr?, #initialize_copy, #insert, #inspect, #line_number, #log, #precompile, #resolve_if, #resolved!, #resolved?, #simple_name, #temp, #to_s
Constructor Details
#initialize ⇒ DynamicType
Returns a new instance of DynamicType.
296 297 298 299 |
# File 'lib/duby/jvm/types.rb', line 296 def initialize # For naming, bytecode purposes, we are an Object @name = "java.lang.Object" end |
Instance Method Details
#assignable_from?(other) ⇒ Boolean
309 310 311 |
# File 'lib/duby/jvm/types.rb', line 309 def assignable_from?(other) ObjectType.assignable_from?(other) end |
#basic_type ⇒ Object
301 302 303 |
# File 'lib/duby/jvm/types.rb', line 301 def basic_type self end |
#is_parent(other) ⇒ Object
305 306 307 |
# File 'lib/duby/jvm/types.rb', line 305 def is_parent(other) ObjectType.assignable_from?(other) end |
#jvm_type ⇒ Object
313 314 315 |
# File 'lib/duby/jvm/types.rb', line 313 def jvm_type java.lang.Object end |