|
4 | 4 | import org.openzen.zenscript.javashared.JavaClass;
|
5 | 5 | import org.openzen.zenscript.javashared.JavaNativeMethod;
|
6 | 6 |
|
7 |
| -public class JavaUnboxingTypeVisitor implements TypeVisitorWithContext<TypeID, Void, RuntimeException> { |
| 7 | +public class JavaUnboxingTypeVisitor implements TypeVisitor<Void> { |
8 | 8 |
|
9 | 9 | private static final JavaNativeMethod UNBOX_BOOLEAN = JavaNativeMethod.getNativeVirtual(JavaClass.BOOLEAN, "booleanValue", "()Z");
|
10 | 10 | private static final JavaNativeMethod UNBOX_BYTE = JavaNativeMethod.getNativeVirtual(JavaClass.BYTE, "byteValue", "()B");
|
@@ -33,7 +33,7 @@ private JavaUnboxingTypeVisitor(JavaWriter writer, boolean unwrapping) {
|
33 | 33 |
|
34 | 34 |
|
35 | 35 | @Override
|
36 |
| - public Void visitBasic(TypeID context, BasicTypeID basic) throws RuntimeException { |
| 36 | + public Void visitBasic(BasicTypeID basic) { |
37 | 37 | final JavaNativeMethod method;
|
38 | 38 |
|
39 | 39 | switch (basic) {
|
@@ -83,55 +83,55 @@ public Void visitBasic(TypeID context, BasicTypeID basic) throws RuntimeExceptio
|
83 | 83 | }
|
84 | 84 |
|
85 | 85 | @Override
|
86 |
| - public Void visitArray(TypeID context, ArrayTypeID array) throws RuntimeException { |
| 86 | + public Void visitArray(ArrayTypeID array) { |
87 | 87 | //NO-OP
|
88 | 88 | return null;
|
89 | 89 | }
|
90 | 90 |
|
91 | 91 | @Override
|
92 |
| - public Void visitAssoc(TypeID context, AssocTypeID assoc) throws RuntimeException { |
| 92 | + public Void visitAssoc(AssocTypeID assoc) { |
93 | 93 | //NO-OP
|
94 | 94 | return null;
|
95 | 95 | }
|
96 | 96 |
|
97 | 97 | @Override
|
98 |
| - public Void visitGenericMap(TypeID context, GenericMapTypeID map) throws RuntimeException { |
| 98 | + public Void visitGenericMap(GenericMapTypeID map) { |
99 | 99 | //NO-OP
|
100 | 100 | return null;
|
101 | 101 | }
|
102 | 102 |
|
103 | 103 | @Override
|
104 |
| - public Void visitIterator(TypeID context, IteratorTypeID iterator) throws RuntimeException { |
| 104 | + public Void visitIterator(IteratorTypeID iterator) { |
105 | 105 | //NO-OP
|
106 | 106 | return null;
|
107 | 107 | }
|
108 | 108 |
|
109 | 109 | @Override
|
110 |
| - public Void visitFunction(TypeID context, FunctionTypeID function) throws RuntimeException { |
| 110 | + public Void visitFunction(FunctionTypeID function) { |
111 | 111 | //NO-OP
|
112 | 112 | return null;
|
113 | 113 | }
|
114 | 114 |
|
115 | 115 | @Override
|
116 |
| - public Void visitDefinition(TypeID context, DefinitionTypeID definition) throws RuntimeException { |
| 116 | + public Void visitDefinition(DefinitionTypeID definition) { |
117 | 117 | //NO-OP
|
118 | 118 | return null;
|
119 | 119 | }
|
120 | 120 |
|
121 | 121 | @Override
|
122 |
| - public Void visitGeneric(TypeID context, GenericTypeID generic) throws RuntimeException { |
| 122 | + public Void visitGeneric(GenericTypeID generic) { |
123 | 123 | //NO-OP
|
124 | 124 | return null;
|
125 | 125 | }
|
126 | 126 |
|
127 | 127 | @Override
|
128 |
| - public Void visitRange(TypeID context, RangeTypeID range) throws RuntimeException { |
| 128 | + public Void visitRange(RangeTypeID range) { |
129 | 129 | //NO-OP
|
130 | 130 | return null;
|
131 | 131 | }
|
132 | 132 |
|
133 | 133 | @Override
|
134 |
| - public Void visitOptional(TypeID context, OptionalTypeID type) throws RuntimeException { |
| 134 | + public Void visitOptional(OptionalTypeID type) { |
135 | 135 | //NO-OP
|
136 | 136 | return null;
|
137 | 137 | }
|
|
0 commit comments