https://github.com/Bread-Experts-Group/file_formats_java_class
Author:Apache-2.0 WITH LLVM-exception
Version:7.0.0
Alire CI: Dependencies:No dependents.
Badge:
file_formats_java_class provides the facilities for reading CLASS files defined
in the Java Virtual Machine Specification,
Java SE 7, CLASS major file version 51,
chapter 4.
ACC_PUBLICACC_FINALACC_SUPERACC_INTERFACEACC_ABSTRACTACC_SYNTHETICACC_ANNOTATIONACC_ENUMCONSTANT_Class_infoCONSTANT_Fieldref_infoCONSTANT_Methodref_infoCONSTANT_InterfaceMethodref_infoCONSTANT_String_infoCONSTANT_Integer_infoCONSTANT_Float_infoCONSTANT_Long_infoCONSTANT_Double_infoCONSTANT_NameAndType_infoCONSTANT_Utf8_infoCONSTANT_MethodHandle_infoCONSTANT_MethodType_infoCONSTANT_InvokeDynamic_infoACC_PUBLICACC_PRIVATEACC_PROTECTEDACC_STATICACC_FINALACC_VOLATILEACC_TRANSIENTACC_SYNTHETICACC_ENUMACC_PUBLICACC_PRIVATEACC_PROTECTEDACC_STATICACC_FINALACC_SYNCHRONIZEDACC_BRIDGEACC_VARARGSACC_NATIVEACC_ABSTRACTACC_STRICTACC_SYNTHETICConstantValueCodeStackMapTableExceptionsInnerClassesEnclosingMethodSyntheticSignatureSourceFileSourceDebugExtensionLineNumberTableLocalVariableTableLocalVariableTypeTableDeprecatedRuntimeVisibleAnnotationsRuntimeInvisibleAnnotationsRuntimeVisibleParameterAnnotationsRuntimeInvisibleParameterAnnotationsAnnotationDefaultBootstrapMethodsOther - Used for unrecognized/private attributesAll pertinent types and subprograms are available within the package
File_Formats_Java_Class. Reading Class_File is done primarily through the Input aspect,
as shown below.
with Ada.Text_IO;
with File_Formats_Java_Class;
use File_Formats_Java_Class;
procedure Read_Class_File is
F : File_Type;
S : Stream_Access;
begin
Open (F, In_File, "Example.class");
S := Stream (F);
Ada.Text_IO.Put_Line (Class_File'Input (S));
Close (F);
end Read_Class_File;
This crate does not yet define operations for writing to CLASS files, but this is a priority. After writing is complete, this crate will be updated to support CLASS files of Java SE 8+. You are free to report issues and contribute at the crate’s GitHub repository.