Thanks you Chiba, I'll do my best with the low-level API  ....
 I have tried the solution you give.
My field private final static String JDEdoc was created thru javassist using a 
static initializer.
Here under the output I obtain trying to get the value of JDEdoc in the class 
bytecode. According to the output,the JDEdoc field has no Attribute and no 
index in the Constant pool
Using the "ByteCode Viewer" tool, I can see the value in the clinit code
....
ldc #22 <..1p1yga ....here is the value I need .....>
invokespecial #25 <java/lang/String.>
putstatic #18 <JA/Tools/jdep/test/BCLASS.JDEdoc>
...
So I have to decompile the clinit bytecode and fetch inside it the relationship 
beetween entry 14 and entry 21? 
Scanning for LDC/INVOKESPECIAL/PUTSTATIC sequence in clinit,I can obtain the 
value I need.
 0=aconst_null
    1=astore_1
    2=jsr
    5=return
    6=astore_0
    7=new
    10=dup
    11=ldc #22 1p1yga .........here is the value I need .....
    13=invokespecial 25
    16=putstatic 18 JDEdoc
    
    Sequence found
    FieldName=JDEdoc
    Value=1p1ygaqw3uj ........here is the value I need .....

In that case, is there an easiest way to proceed?
Is it possible to find directly in constant pool the relation #22 <==> #18?

Dominique 
 

//// THE OUTPUT ////
  Field JDEdoc descriptor is Ljava/lang/String;
    Field JDEdoc is private static final
    Field JDEdoc has a constant_pool table.
    1 Method #3, name&type #10
    2 Class #11
    3 Class #12
    4 UTF8 ""
    5 UTF8 "()V"
    6 UTF8 "Code"
    7 UTF8 "LineNumberTable"
    8 UTF8 "SourceFile"
    9 UTF8 "BCLASS.java"
    10 NameAndType #4, type #5
    11 UTF8 "JA/Tools/jdep/test/BCLASS"
    12 UTF8 "java/lang/Object"
    13 UTF8 ""
    14 UTF8 "JDEdoc"
    15 UTF8 "Ljava/lang/String;"
    16 Class #11
    17 NameAndType #14, type #15
    18 Field #16, name&type #17
    19 UTF8 "java/lang/String"
    20 Class #19
    21 UTF8 "1p1yga ....here is the value I need ...."
         22 String #21
    23 UTF8 "(Ljava/lang/String;)V"
    24 NameAndType #4, type #23
    25 Method #20, name&type #24
    26 UTF8 "getDocumentation"
    27 UTF8 "()Ljava/lang/String;"
    28 NameAndType #14, type #15
    29 Field #16, name&type #28
    30 UTF8 "JA/Utils/Gzip"
    31 Class #30
    32 UTF8 "gunzip36"
    33 UTF8 "(Ljava/lang/String;)[B"
    34 NameAndType #32, type #33
    35 Method #31, name&type #34
    36 UTF8 "([B)V"
    37 NameAndType #4, type #36
    38 Method #20, name&type #37
    39 UTF8 "JA/Interfaces/JDEDocumentation"
    40 Class #39
    41 UTF8 "JA/Interfaces/JDESource"
    42 Class #41
    43 UTF8 "JA/Interfaces/JDE"
    44 Class #43
    Field JDEdoc has no index into the constant_pool table.
    FieldInfo for Field JDEdoc has 0 Attributes
    Field JDEdoc has a null ConstantValue


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3865776#3865776

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3865776


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to