org.opalj.hermes.queries.ClassFileVersion.markdown Maven / Gradle / Ivy
The newest version!
# Class File Version
Extracts the class file version of each class file belonging to the project.
## Note
Class files using Java 1.0 and 1.1. are grouped together because they use the same class file version number.
## Major Features of Selected Class File Versions
### Java 6 and newer
Generally, don't have *jsr*/*ret* instructions anymore, because Java stopped generating them. However, technically they are still allowed and were only forbidden with version 51 (*cf. Java Virtual Machine Specification - Constraints on Java Virtual Machine code - Static Constraints*)
### Java 7 and newer
May have *invokedynamic* instructions; however Java only started using *invokedynamic* with Java 8 and all other languages (e.g., Clojure, Groovy, Scala) also did not starte using them right away.
### Java 8 and newer
- usually have *invokedynamic* instructions because Java started using it
- added default methods (this changed the way how method resolution works)
## Attributes per Class File Version
Attribute ClassFileVersion Java SE
ConstantValue 45.3 1.0.2
Code 45.3 1.0.2
Exceptions 45.3 1.0.2
SourceFile 45.3 1.0.2
LineNumberTable 45.3 1.0.2
LocalVariableTable 45.3 1.0.2
InnerClasses 45.3 1.1
Synthetic 45.3 1.1
Deprecated 45.3 1.1
EnclosingMethod 49.0 5.0
Signature 49.0 5.0
SourceDebugExtension 49.0 5.0
LocalVariableTypeTable 49.0 5.0
RuntimeVisibleAnnotations 49.0 5.0
RuntimeInvisibleAnnotations 49.0 5.0
RuntimeVisibleParameterAnnotations 49.0 5.0
RuntimeInvisibleParameterAnnotations 49.0 5.0
AnnotationDefault 49.0 5.0
StackMapTable 50.0 6
BootstrapMethods 51.0 7
RuntimeVisibleTypeAnnotations 52.0 8
RuntimeInvisibleTypeAnnotations 52.0 8
MethodParameters 52.0 8
© 2015 - 2025 Weber Informatics LLC | Privacy Policy