ClassFileAnalyzer (Can)
Home

 

Example: TestCanRuntimeInvisibleAnnotations

Test directive .annotation

 

/* TestCanRuntimeInvisibleAnnotations.java */ 

import java.lang.annotation.*;

@Documented
@Retention(value = RetentionPolicy.CLASS)
@Target(value = { ElementType.TYPE, ElementType.FIELD, ElementType.METHOD })
public @interface TestCanRuntimeInvisibleAnnotations {
  int id();
  String surname();
  String forename();
}

 

> javac TestCanRuntimeInvisibleAnnotations.java
> java ClassFileAnalyzer TestCanRuntimeInvisibleAnnotations.class

 

; TestCanRuntimeInvisibleAnnotations.j

; Generated by ClassFileAnalyzer (Can)
; Analyzer and Disassembler for Java class files
; (Jasmin syntax 2, http://jasmin.sourceforge.net)
;
; ClassFileAnalyzer, version 0.7.0


.bytecode 50.0
.source TestCanRuntimeInvisibleAnnotations.java
.interface public abstract annotation TestCanRuntimeInvisibleAnnotations
; Flag ACC_SUPER not set, see JVM spec
.super java/lang/Object
.implements java/lang/annotation/Annotation
.annotation visible Ljava/lang/annotation/Documented;
  .end annotation
.annotation visible Ljava/lang/annotation/Retention;
  value e Ljava/lang/annotation/RetentionPolicy; = CLASS
  .end annotation
.annotation visible Ljava/lang/annotation/Target;
  value [e Ljava/lang/annotation/ElementType; = TYPE FIELD METHOD
  .end annotation

.method public abstract id()I
.end method

.method public abstract surname()Ljava/lang/String;
.end method

.method public abstract forename()Ljava/lang/String;
.end method