de.intarsys.nativec.type
Class NativeShort

java.lang.Object
  extended by de.intarsys.nativec.type.NativeObject
      extended by de.intarsys.nativec.type.NativeSimple
          extended by de.intarsys.nativec.type.NativeNumber
              extended by de.intarsys.nativec.type.NativeShort
All Implemented Interfaces:
INativeObject

public class NativeShort
extends NativeNumber

A wrapper for a primitive short.


Field Summary
static NativeShortType META
          The meta class instance
 
Fields inherited from class de.intarsys.nativec.type.NativeObject
DEBUG, handle, SHIFT_INT, SHIFT_LONG, SHIFT_LONGLONG, SIZE_BYTE, SIZE_INT, SIZE_LONG, SIZE_LONGLONG, SIZE_PTR, SIZE_SHORT
 
Constructor Summary
  NativeShort()
          Create a new wrapper
protected NativeShort(INativeHandle handle)
           
  NativeShort(short value)
          Create a new wrapper
 
Method Summary
 byte byteValue()
          This as a java primitive byte value.
static NativeShort createFromAddress(long address)
           
 INativeType getNativeType()
          The meta information and behavior for the NativeObject.
 java.lang.Object getValue()
          A Java side representation from the memory.
 int intValue()
          This as a java primitive int value.
 long longValue()
          This as a java primitive long value.
 void setValue(java.lang.Object value)
          Assign (and marshall to memory) the Java side representation.
 void setValue(short value)
           
 short shortValue()
          This as a java primitive short value.
 java.lang.String toString()
           
 
Methods inherited from class de.intarsys.nativec.type.NativeSimple
getByteCount
 
Methods inherited from class de.intarsys.nativec.type.NativeObject
allocate, cast, createReference, getByte, getByteArray, getBytes, getCLong, getInt, getNativeHandle, getNativeHandle, getShort, getString, getWideString, isNull, setByte, setByteArray, setCLong, setInt, setNativeHandle, setShort, setString, setWideString, toNestedString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

META

public static final NativeShortType META
The meta class instance

Constructor Detail

NativeShort

public NativeShort()
Create a new wrapper


NativeShort

protected NativeShort(INativeHandle handle)

NativeShort

public NativeShort(short value)
Create a new wrapper

Method Detail

createFromAddress

public static NativeShort createFromAddress(long address)

byteValue

public byte byteValue()
Description copied from class: NativeNumber
This as a java primitive byte value.

Specified by:
byteValue in class NativeNumber
Returns:
This as a java primitive byte value.

getNativeType

public INativeType getNativeType()
Description copied from class: NativeObject
The meta information and behavior for the NativeObject.

There is exactly one meta instance for all NativeObject instances of a certain type.

Specified by:
getNativeType in interface INativeObject
Specified by:
getNativeType in class NativeObject
Returns:
The meta information and behavior for the NativeObject.

getValue

public java.lang.Object getValue()
Description copied from interface: INativeObject
A Java side representation from the memory.

Returns:
A Java side representation for the INativeObject.

intValue

public int intValue()
Description copied from class: NativeNumber
This as a java primitive int value.

Specified by:
intValue in class NativeNumber
Returns:
This as a java primitive int value.

longValue

public long longValue()
Description copied from class: NativeNumber
This as a java primitive long value.

Specified by:
longValue in class NativeNumber
Returns:
This as a java primitive long value.

setValue

public void setValue(java.lang.Object value)
Description copied from interface: INativeObject
Assign (and marshall to memory) the Java side representation.

Parameters:
value - The new Java value.

setValue

public void setValue(short value)

shortValue

public short shortValue()
Description copied from class: NativeNumber
This as a java primitive short value.

Specified by:
shortValue in class NativeNumber
Returns:
This as a java primitive short value.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object