ClassFileAnalyzer (Can)
Home

 

Example: TestCanSignature

Test directive .signature

 

/* TestCanSignature.java */

public class TestCanSignature<E> {
  
  private E value;
    
  public void set(E v) {
    value = v;
  }  
  
  public E get() {
    return value;
  }
}

 

> javac TestCanSignature.java
> java ClassFileAnalyzer TestCanSignature.class

 

; TestCanSignature.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 TestCanSignature.java
.class public TestCanSignature
.super java/lang/Object
.signature "<E:Ljava/lang/Object;>Ljava/lang/Object;"

.field private value Ljava/lang/Object;
  .signature "TE;"
  .end field

.method public <init>()V
  .limit stack 1
  .limit locals 1
  .line 3
  0: aload_0
  1: invokespecial java/lang/Object/<init>()V
  4: return
.end method

.method public set(Ljava/lang/Object;)V
  .limit stack 2
  .limit locals 2
  .line 8
  0: aload_0
  1: aload_1
  2: putfield TestCanSignature/value Ljava/lang/Object;
  .line 9
  5: return
  .signature "(TE;)V"
.end method

.method public get()Ljava/lang/Object;
  .limit stack 1
  .limit locals 1
  .line 12
  0: aload_0
  1: getfield TestCanSignature/value Ljava/lang/Object;
  4: areturn
  .signature "()TE;"
.end method