Module: Jinx::IdAlias

Defined in:
lib/jinx/metadata/id_alias.rb

Overview

Mix-in for Java classes which have an id attribute. Since id is a reserved Ruby method, this mix-in defines an identifier attribute which fronts the id attribute. This mix-in should be included by any JRuby wrapper class for a Java class or interface which implements an id property.

Instance Method Summary collapse

Instance Method Details

#identifierInteger

Returns the identifier. This method delegates to the Java id attribute reader method.

Returns:

  • (Integer)

    the identifier value



11
12
13
# File 'lib/jinx/metadata/id_alias.rb', line 11

def identifier
  getId
end

#identifier=(value) ⇒ Object

Sets the identifier to the given value. This method delegates to the Java id attribute writer method.

Parameters:

  • value (Integer)

    the value to set



20
21
22
# File 'lib/jinx/metadata/id_alias.rb', line 20

def identifier=(value)
  setId(value)
end