APIs for Java Developers
Go to APIs for .NET Developers (coming soon)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) variableThis 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.