Sha256: 895ea4cb00946a5b202532783c5c6423da3668d89aa6ffea030c6ff8c6ff5a5a

Contents?: true

Size: 872 Bytes

Versions: 1

Compression:

Stored size: 872 Bytes

Contents

module Mirah
  module JVM
    module Types
      class DynamicType < Type
        def initialize(types)
          # For naming, bytecode purposes, we are an Object
          super(types, "java.lang.Object")
          @object_type ||= types.type(nil, 'java.lang.Object')
        end

        def basic_type
          self
        end

        def is_parent(other)
          @object_type.assignable_from?(other)
        end

        def assignable_from?(other)
          @object_type.assignable_from?(other)
        end

        def jvm_type
          java.lang.Object
        end

        def full_name
          "dynamic"
        end

        def dynamic?
          true
        end

        def superclass
          @object_type.superclass
        end

        def interfaces(include_parent=true)
          @object_type.interfaces
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mirah-0.1.0.pre-java lib/mirah/jvm/types/dynamic_type.rb