mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Implement default annotation values and annotations of method parameters in IR binary serializer
This commit is contained in:
parent
3821d29f1c
commit
17113533fc
|
@ -195,6 +195,18 @@ public class DiskCachedClassHolderSource implements ClassHolderSource {
|
|||
output.writeByte(method.getLevel().ordinal());
|
||||
output.writeInt(packModifiers(method.getModifiers()));
|
||||
writeAnnotations(output, method.getAnnotations());
|
||||
|
||||
for (AnnotationContainer parameterAnnotation : method.getParameterAnnotations()) {
|
||||
writeAnnotations(output, parameterAnnotation);
|
||||
}
|
||||
|
||||
if (method.getAnnotationDefault() != null) {
|
||||
output.writeBoolean(true);
|
||||
writeAnnotationValue(output, method.getAnnotationDefault());
|
||||
} else {
|
||||
output.writeBoolean(false);
|
||||
}
|
||||
|
||||
if (method.getProgram() != null) {
|
||||
output.writeBoolean(true);
|
||||
programIO.write(method.getProgram(), output);
|
||||
|
@ -209,6 +221,15 @@ public class DiskCachedClassHolderSource implements ClassHolderSource {
|
|||
method.setLevel(accessLevels[input.readByte()]);
|
||||
method.getModifiers().addAll(unpackModifiers(input.readInt()));
|
||||
readAnnotations(input, method.getAnnotations());
|
||||
|
||||
for (int i = 0; i < method.parameterCount(); ++i) {
|
||||
readAnnotations(input, method.parameterAnnotation(i));
|
||||
}
|
||||
|
||||
if (input.readBoolean()) {
|
||||
method.setAnnotationDefault(readAnnotationValue(input));
|
||||
}
|
||||
|
||||
boolean hasProgram = input.readBoolean();
|
||||
if (hasProgram) {
|
||||
method.setProgram(programIO.read(input));
|
||||
|
|
Loading…
Reference in New Issue
Block a user