Closed GoogleCodeExporter closed 9 years ago
Can you clarify why you are building a fileset of class files?
Original comment by kurt.kluever
on 7 Aug 2012 at 5:26
The fileset is of source files, but the ant AnnotationSelector we build uses
the class file to detect the annotation. That seemed simpler than having to
parse the source for it.
The is the basic pattern of the selector we had implemented
http://grokbase.com/t/ant/user/08apgzmbw6/aw-building-a-fileset-using-annotation
s
Original comment by daniel.h...@gmail.com
on 7 Aug 2012 at 6:26
Also posted here
http://stackoverflow.com/questions/11657549/can-retention-policy-of-gwtcompatibl
e-be-changed-to-runtime
I still want to see a proper description of what the OP is *really ultimately
trying to accomplish* and see if the SO community really doesn't have a better
way to do it, first, before assuming we have to change this.
Original comment by kevinb@google.com
on 7 Aug 2012 at 8:27
I have a module that contains both GWT safe and non GWT safe classes. I need
to create a jar file that contains only the GWT safe java files from the module
to be provided to the eventual UI module that owns the full GWT compile
process. That is the requirement I'm trying to satisfy.
In order to do this, it seemed like a good idea to annotate the classes with
@GwtCompatible. Then the question became, how during our ant build process
could we recognize which classes were GwtCompatible in order to build this jar
file. We found the grokbase article that defined exactly a manner to do what
we wanted, that it select java files that contain classes with a specific
annotation. The problem is that implementation presumes an annotation that has
RetentionType of RUNTIME.
From the ant build file perspective, this is a very clear and readable approach
that we would like to have and from the AnnotationSelector implementation it is
a vary simple implementation given this RUNTIME availability.
Is there a particular concern with the RUNTIME availability in general. While
CLASS retention states that the annotation is recorded in the class file, I
don't know of a mechanism to obtain that without trying to actually interpret
the byte code itself. How could I implement AnnotationSelector in a simple
manner with that constraint? I'm not sure I understand the JVM level value
provided by the CLASS retention type, what does use case does that really
provide that SOURCE or RUNTIME do not?
Original comment by daniel.h...@gmail.com
on 7 Aug 2012 at 8:59
This issue has been migrated to GitHub.
It can be found at https://github.com/google/guava/issues/<id>
Original comment by cgdecker@google.com
on 1 Nov 2014 at 4:13
Original comment by cgdecker@google.com
on 3 Nov 2014 at 9:08
Original issue reported on code.google.com by
chetanku...@gmail.com
on 31 Jul 2012 at 2:32