Skip to content

Commit 209520c

Browse files
committed
Add "convertToDataObject()" examples for byte[] values and Array class values
1 parent 3b49457 commit 209520c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/me/jddev0/ExampleModule.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ public DataObject load(List<DataObject> args, final int SCOPE_ID) {
122122
printDataObjectInformation(convertToDataObject(new Object[] {
123123
2, "test", null, Character.class
124124
}), useLangShellsPrintDebug, INNER_SCOPE_ID);
125+
printDataObjectInformation(convertToDataObject(new byte[] {
126+
2, -1, (byte)255, 127, -128, 0, (byte)'A', (byte)'B', (byte)'µ', (byte)1555
127+
}), useLangShellsPrintDebug, INNER_SCOPE_ID);
125128
printDataObjectInformation(convertToDataObject(42), useLangShellsPrintDebug, INNER_SCOPE_ID);
126129
printDataObjectInformation(convertToDataObject(true), useLangShellsPrintDebug, INNER_SCOPE_ID);
127130
printDataObjectInformation(convertToDataObject(42.2f), useLangShellsPrintDebug, INNER_SCOPE_ID);
@@ -133,6 +136,10 @@ public DataObject load(List<DataObject> args, final int SCOPE_ID) {
133136
printDataObjectInformation(convertToDataObject(Boolean.class), useLangShellsPrintDebug, INNER_SCOPE_ID);
134137
printDataObjectInformation(convertToDataObject(Long.class), useLangShellsPrintDebug, INNER_SCOPE_ID);
135138
printDataObjectInformation(convertToDataObject(Class.class), useLangShellsPrintDebug, INNER_SCOPE_ID);
139+
printDataObjectInformation(convertToDataObject(Object[].class), useLangShellsPrintDebug, INNER_SCOPE_ID); //DataType.ARRAY
140+
printDataObjectInformation(convertToDataObject(DataObject[].class), useLangShellsPrintDebug, INNER_SCOPE_ID); //DataType.ARRAY
141+
printDataObjectInformation(convertToDataObject(Byte[].class), useLangShellsPrintDebug, INNER_SCOPE_ID); //DataType.ARRAY
142+
printDataObjectInformation(convertToDataObject(byte[].class), useLangShellsPrintDebug, INNER_SCOPE_ID); //ByteBuffer.ARRAY
136143

137144
return null;
138145
});

0 commit comments

Comments
 (0)