Sha256: 753027477b3c2b7068e39fc5621f1fe049fe744f537b7f7eb003676f550c7710

Contents?: true

Size: 887 Bytes

Versions: 3

Compression:

Stored size: 887 Bytes

Contents

module Mirah
  module JVM
    module Types
      class MetaType < Type
        attr_reader :unmeta

        def initialize(unmeta)
          super(unmeta.type_system, unmeta.name)
          @unmeta = unmeta
        end

        def basic_type
          @unmeta.basic_type
        end

        def name
          return @unmeta.name if @unmeta
          super
        end

        def meta?
          true
        end

        def meta
          self
        end

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

        def interfaces(include_parent=true)
          []
        end

        def jvm_type
          unmeta.jvm_type
        end

        def inner_class?
          basic_type.inner_class?
        end
      end

      class TypeDefMeta < MetaType
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mirah-0.1.2-java lib/mirah/jvm/types/meta_type.rb
mirah-0.1.1-java lib/mirah/jvm/types/meta_type.rb
mirah-0.1.0-java lib/mirah/jvm/types/meta_type.rb