APIs for Java Developers

Go to APIs for .NET Developers


Class NUShort

  • java.lang.Object
    • com.javonet.api.types.NUShort

  • public class NUShort
    extends java.lang.Object
    A class that represents .NET System.UInt16 (ushort) variable

    This class should be used when target method, field or property expects ushort value.

    Because JAVA does not provide unsigned integral variables NUShort wrapping class should be used to instruct Javonet
    to convert particular JAVA Integer value into ushort on .NET side.
    Notice that ushort value is beyond JAVA short range therefore JAVA Integer variable is used.


    .NET method expecting ushort argument.

      MethodA(ushort arg1)

    Calling MethodA from JAVA:

     Integer i = 1;
     obj.invoke("MethodA",new NUShort(i)); 

    • Constructor Summary

      Constructor and Description
      NUShort(java.lang.Integer integerValue)

      Creates new instance of NUShort class wrapping Integer value provided as argument.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Integer getIntegerValue()

      Returns wrapped Integer value.

      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    • Constructor Detail

      • NUShort

        public NUShort(java.lang.Integer integerValue)
        Creates new instance of NUShort class wrapping Integer value provided as argument.

        This value will be converted on .NET side to ushort.

        integerValue – Integer value to be wrapped and converted to ushort on .NET side

    • Method Detail

      • getIntegerValue

        public java.lang.Integer getIntegerValue()
        Returns wrapped Integer value.
        Wrapped integer value