class Squash::Java::Argument

A {Squash::Java::Method Method} argument. Includes the argument {Squash::Java::Type} and whether it is a scalar or an array.

Attributes

dimensionality[R]

@return [Fixnum] The number of dimensions for vector values. A type of

`int[][]` has a dimensionality of 2. Scalars have a dimensionality of 0.
type[R]

@return [Squash::Java::Type] The argument type.

Public Class Methods

new(type, dimensionality=0) click to toggle source

@private

# File lib/squash/java/namespace.rb, line 532
def initialize(type, dimensionality=0)
  @type           = type
  @dimensionality = dimensionality
end

Public Instance Methods

==(other) click to toggle source

@private

# File lib/squash/java/namespace.rb, line 538
def ==(other)
  other.kind_of?(Squash::Java::Argument) &&
      type == other.type &&
      dimensionality == other.dimensionality
end
inspect() click to toggle source

@private

# File lib/squash/java/namespace.rb, line 548
def inspect() "#<#{self.class} #{to_s}>" end
to_s() click to toggle source

@return [String] The type's full name, with “[]” appended for arrays.

# File lib/squash/java/namespace.rb, line 545
def to_s() "#{type.full_name}#{'[]'*dimensionality}" end