This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gcj trunk / gnu-classpath] String.format(...) undefined


On Wed, 21 Feb 2007 14:50:27 +0000
Andrew Haley <aph@redhat.com> wrote:

> Anyway, if you can get me an easily reproducible test case I'll have a
> look.  Let me know what to download, how to run it, etc.

Another try with reduced testcase attached. Run:

	$ gcj -C -fsource=1.5 -ftarget=1.5 Test.java
	$ gij Test

So, the Retention annotation cannot handle 'value()' as array.


Hanno
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Test.Array({Class.class})
//@Test.Array(Class.class)
public class Test {
	@Retention(RetentionPolicy.RUNTIME)
	@Target(ElementType.TYPE)
	public @interface Array {
		public Class<?>[] value();
		//public Class<?> value();
	}

	public static void main(String[] args) {
		Array a = (Test.class).getAnnotation(Array.class);
		System.out.println(a.value());
	}
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]