com.javonet.api.types

Class NSByte

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

  • public class NSByte
    extends java.lang.Object
    A class that represents .NET System.SByte (sbyte) variable

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

    Because .NET byte is unsigned Javonet is automatically converting Java signed byte into unsigned values when byte is provided.
    To allow setting values of sbyte variables or passing sbyte arguments NSByte wrapping class has been introduced.
    Java Byte variable should be wrapped by NSByte class in order to instruct Javonet to convert it to .NET sbyte value on .NET side.

    Usage

    .NET method expecting sbyte argument.

      MethodA(sbyte arg1)
     

    Calling MethodA from JAVA:

      
     byte b = 1;
     obj.invoke("MethodA",new NSByte(b)); 
     
    Version:
    1.3


    • Constructor Summary

      Constructors 
      Constructor and Description
      NSByte(java.lang.Byte byteValue)

      Creates new instance of NSByte class wrapping byte value provided as argument.



    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Byte getByteValue()

      Returns wrapped byte value.


      • Methods inherited from class java.lang.Object

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



    • Constructor Detail



      • NSByte

        public NSByte(java.lang.Byte byteValue)
        Creates new instance of NSByte class wrapping byte value provided as argument.
        Parameters:
        byteValue – Byte value to be wrapped and converted to sbyte on .NET side



    • Method Detail



      • getByteValue

        public java.lang.Byte getByteValue()
        Returns wrapped byte value.
        Returns:
        Wrapped byte value