Created
December 6, 2011 06:03
-
-
Save khotyn/1436957 to your computer and use it in GitHub Desktop.
What is AnnotationDefault in Java class file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.annotation.*; | |
@Retention(RetentionPolicy.RUNTIME) | |
@Target(ElementType.METHOD) | |
public @interface AnnoMethod { | |
int id() default 9; | |
String value() default "Hello, world"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compiled from "AnnoMethod.java" | |
public interface AnnoMethod extends java.lang.annotation.Annotation | |
SourceFile: "AnnoMethod.java" | |
RuntimeVisibleAnnotations: length = 0x1B | |
00 02 00 0E 00 01 00 08 65 00 0F 00 10 00 11 00 | |
01 00 08 5B 00 01 65 00 12 00 13 | |
minor version: 0 | |
major version: 50 | |
Constant pool: | |
const #1 = class #20; // AnnoMethod | |
const #2 = class #21; // java/lang/Object | |
const #3 = class #22; // java/lang/annotation/Annotation | |
const #4 = Asciz id; | |
const #5 = Asciz ()I; | |
const #6 = Asciz AnnotationDefault; | |
const #7 = int 9; | |
const #8 = Asciz value; | |
const #9 = Asciz ()Ljava/lang/String;; | |
const #10 = Asciz Hello, world; | |
const #11 = Asciz SourceFile; | |
const #12 = Asciz AnnoMethod.java; | |
const #13 = Asciz RuntimeVisibleAnnotations; | |
const #14 = Asciz Ljava/lang/annotation/Retention;; | |
const #15 = Asciz Ljava/lang/annotation/RetentionPolicy;; | |
const #16 = Asciz RUNTIME; | |
const #17 = Asciz Ljava/lang/annotation/Target;; | |
const #18 = Asciz Ljava/lang/annotation/ElementType;; | |
const #19 = Asciz METHOD; | |
const #20 = Asciz AnnoMethod; | |
const #21 = Asciz java/lang/Object; | |
const #22 = Asciz java/lang/annotation/Annotation; | |
{ | |
public abstract int id(); | |
AnnotationDefault: length = 0x3 | |
49 00 07 | |
public abstract java.lang.String value(); | |
AnnotationDefault: length = 0x3 | |
73 00 0A | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
AnnotationDefault
represents a default value of a method in an Annotation.