Path: csiph.com!aioe.org!news.glorb.com!postnews.google.com!p13g2000yqd.googlegroups.com!not-for-mail From: mani Newsgroups: comp.lang.java.programmer Subject: read java Annotation field values from class Date: Thu, 1 Mar 2012 02:57:38 -0800 (PST) Organization: http://groups.google.com Lines: 12 Message-ID: <6a955e2b-8f3e-4546-ad7d-e5ae13cf3a63@p13g2000yqd.googlegroups.com> NNTP-Posting-Host: 27.251.30.70 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1330599554 17589 127.0.0.1 (1 Mar 2012 10:59:14 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 1 Mar 2012 10:59:14 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p13g2000yqd.googlegroups.com; posting-host=27.251.30.70; posting-account=pa7kTgoAAAAaAM5cWyISM4dM3n5XoYZs User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1,gzip(gfe) Xref: csiph.com comp.lang.java.programmer:12557 How to read java Annotation field values from reflect class. I am having a java class file Myclass.java. This file having the annotation @interface MyAnnotation { boolean DuplicateValues(); boolean DuplicateVariables(); } @MyAnnotation(DuplicateValues = true, DuplicateVariables = true) I need to get get value of DuplicateValues, DuplicateVariables, that means true,true from Myclass.class .