Sha256: 579248e30cc2a61ace4c604eefa20d13df9a267080c96de6c47fd1f36f6e0392

Contents?: true

Size: 880 Bytes

Versions: 5

Compression:

Stored size: 880 Bytes

Contents

module Mirah
  module JVM
    module Types
      class DynamicType < Type
        ObjectType = Type.new(BiteScript::ASM::ClassMirror.for_name('java.lang.Object'))

        def initialize
          # For naming, bytecode purposes, we are an Object
          @name = "java.lang.Object"
        end

        def basic_type
          self
        end

        def is_parent(other)
          ObjectType.assignable_from?(other)
        end

        def assignable_from?(other)
          ObjectType.assignable_from?(other)
        end

        def jvm_type
          java.lang.Object
        end
        
        def full_name
          "dynamic"
        end

        def dynamic?
          true
        end
        
        def superclass
          ObjectType.superclass
        end
        
        def interfaces
          ObjectType.interfaces
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mirah-0.0.12-java lib/mirah/jvm/types/dynamic_type.rb
mirah-0.0.11-java lib/mirah/jvm/types/dynamic_type.rb
mirah-0.0.10-java lib/mirah/jvm/types/dynamic_type.rb
mirah-0.0.9-java lib/mirah/jvm/types/dynamic_type.rb
mirah-0.0.8-java lib/mirah/jvm/types/dynamic_type.rb