You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by re...@apache.org on 2010/02/08 07:45:57 UTC
svn commit: r907559 - in
/harmony/enhanced/classlib/branches/java6/modules/annotation/src:
main/java/javax/ main/java/javax/annotation/
test/java/org/apache/harmony/annotation/tests/javax/
test/java/org/apache/harmony/annotation/tests/javax/annotation/
Author: regisxu
Date: Mon Feb 8 06:45:55 2010
New Revision: 907559
URL: http://svn.apache.org/viewvc?rev=907559&view=rev
Log:
Apply patch for HARMONY-6436: [java6]implement javax.annotation package
Added:
harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/
harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/
harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/Generated.java (with props)
harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/PostConstruct.java (with props)
harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/PreDestroy.java (with props)
harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/Resource.java (with props)
harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/Resources.java (with props)
harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/
harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/
harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/GeneratedTest.java (with props)
harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/PostConstructTest.java (with props)
harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/PreDestroyTest.java (with props)
harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/ResourceTest.java (with props)
harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/Resource_AuthenticationTypeTest.java (with props)
harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/ResourcesTest.java (with props)
Added: harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/Generated.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/Generated.java?rev=907559&view=auto
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/Generated.java (added)
+++ harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/Generated.java Mon Feb 8 06:45:55 2010
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Documented
+@Retention(value = RetentionPolicy.SOURCE)
+@Target(value = { ElementType.PACKAGE, ElementType.TYPE,
+ ElementType.ANNOTATION_TYPE, ElementType.METHOD,
+ ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.LOCAL_VARIABLE,
+ ElementType.PARAMETER })
+public @interface Generated {
+ String[] value();
+
+ String comments();
+
+ String date();
+}
Propchange: harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/Generated.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/PostConstruct.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/PostConstruct.java?rev=907559&view=auto
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/PostConstruct.java (added)
+++ harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/PostConstruct.java Mon Feb 8 06:45:55 2010
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Documented
+@Retention(value = RetentionPolicy.RUNTIME)
+@Target(value = ElementType.METHOD)
+public @interface PostConstruct {
+
+}
Propchange: harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/PostConstruct.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/PreDestroy.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/PreDestroy.java?rev=907559&view=auto
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/PreDestroy.java (added)
+++ harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/PreDestroy.java Mon Feb 8 06:45:55 2010
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Documented
+@Retention(value = RetentionPolicy.RUNTIME)
+@Target(value = ElementType.METHOD)
+public @interface PreDestroy {
+}
Propchange: harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/PreDestroy.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/Resource.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/Resource.java?rev=907559&view=auto
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/Resource.java (added)
+++ harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/Resource.java Mon Feb 8 06:45:55 2010
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(value = { ElementType.TYPE, ElementType.FIELD, ElementType.METHOD })
+@Retention(value = RetentionPolicy.RUNTIME)
+public @interface Resource {
+ public enum AuthenticationType {
+ CONTAINER, APPLICATION
+ }
+
+ AuthenticationType authenticationType() default javax.annotation.Resource.AuthenticationType.CONTAINER;
+
+ String description() default "";
+
+ String mappedName() default "";
+
+ String name() default "";
+
+ boolean shareable() default true;
+
+ Class type() default java.lang.Object.class;
+}
Propchange: harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/Resource.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/Resources.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/Resources.java?rev=907559&view=auto
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/Resources.java (added)
+++ harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/Resources.java Mon Feb 8 06:45:55 2010
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Documented
+@Retention(value = RetentionPolicy.RUNTIME)
+@Target(value = ElementType.TYPE)
+public @interface Resources {
+ Resource[] value();
+}
Propchange: harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java/javax/annotation/Resources.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/GeneratedTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/GeneratedTest.java?rev=907559&view=auto
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/GeneratedTest.java (added)
+++ harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/GeneratedTest.java Mon Feb 8 06:45:55 2010
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.harmony.annotation.tests.javax.annotation;
+
+import javax.annotation.Generated;
+
+import junit.framework.TestCase;
+
+public class GeneratedTest extends TestCase {
+ public void testGenerated() throws SecurityException, NoSuchFieldException {
+ assertTrue(Generated.class.isAnnotation());
+ }
+}
Propchange: harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/GeneratedTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/PostConstructTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/PostConstructTest.java?rev=907559&view=auto
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/PostConstructTest.java (added)
+++ harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/PostConstructTest.java Mon Feb 8 06:45:55 2010
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.harmony.annotation.tests.javax.annotation;
+
+import javax.annotation.PostConstruct;
+
+import junit.framework.TestCase;
+
+public class PostConstructTest extends TestCase {
+ public void testPostConstruct() {
+ assertTrue(PostConstruct.class.isAnnotation());
+ }
+}
Propchange: harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/PostConstructTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/PreDestroyTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/PreDestroyTest.java?rev=907559&view=auto
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/PreDestroyTest.java (added)
+++ harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/PreDestroyTest.java Mon Feb 8 06:45:55 2010
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.harmony.annotation.tests.javax.annotation;
+
+import javax.annotation.PreDestroy;
+
+import junit.framework.TestCase;
+
+public class PreDestroyTest extends TestCase {
+ public void testPreDestroyTest() {
+ assertTrue(PreDestroy.class.isAnnotation());
+ }
+}
Propchange: harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/PreDestroyTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/ResourceTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/ResourceTest.java?rev=907559&view=auto
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/ResourceTest.java (added)
+++ harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/ResourceTest.java Mon Feb 8 06:45:55 2010
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.harmony.annotation.tests.javax.annotation;
+
+import javax.annotation.Resource;
+
+import junit.framework.TestCase;
+
+public class ResourceTest extends TestCase {
+ public void testResource() {
+ assertTrue(Resource.class.isAnnotation());
+ }
+}
Propchange: harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/ResourceTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/Resource_AuthenticationTypeTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/Resource_AuthenticationTypeTest.java?rev=907559&view=auto
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/Resource_AuthenticationTypeTest.java (added)
+++ harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/Resource_AuthenticationTypeTest.java Mon Feb 8 06:45:55 2010
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.harmony.annotation.tests.javax.annotation;
+
+import javax.annotation.Resource;
+
+import junit.framework.TestCase;
+
+public class Resource_AuthenticationTypeTest extends TestCase {
+ public void testValues() {
+ Resource.AuthenticationType[] types = Resource.AuthenticationType
+ .values();
+ assertEquals(2, types.length);
+ // the result array should be ordered
+ assertEquals(Resource.AuthenticationType.CONTAINER, types[0]);
+ assertEquals(Resource.AuthenticationType.APPLICATION, types[1]);
+ }
+
+ public void testValueOf() {
+ Resource.AuthenticationType type = Resource.AuthenticationType
+ .valueOf("CONTAINER");
+ assertEquals(Resource.AuthenticationType.CONTAINER, type);
+
+ type = Resource.AuthenticationType.valueOf("APPLICATION");
+ assertEquals(Resource.AuthenticationType.APPLICATION, type);
+
+ try {
+ type = Resource.AuthenticationType.valueOf(null);
+ fail("should throw NPE");
+ } catch (NullPointerException e) {
+ // expected
+ }
+
+ try {
+ type = Resource.AuthenticationType.valueOf("wrong name");
+ fail("should throw IAE");
+ } catch (IllegalArgumentException e) {
+ // expected
+ }
+ }
+}
Propchange: harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/Resource_AuthenticationTypeTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/ResourcesTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/ResourcesTest.java?rev=907559&view=auto
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/ResourcesTest.java (added)
+++ harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/ResourcesTest.java Mon Feb 8 06:45:55 2010
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.harmony.annotation.tests.javax.annotation;
+
+import javax.annotation.Resources;
+
+import junit.framework.TestCase;
+
+public class ResourcesTest extends TestCase {
+ public void testResources() {
+ assertTrue(Resources.class.isAnnotation());
+ }
+}
Propchange: harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/javax/annotation/ResourcesTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Re: javax.annotation (was: Re: svn commit: r907559)
Posted by Ray Chen <cl...@gmail.com>.
Hi Mark,
I didn't know there is such a completed implementation.
Yes, we can use it, we can also implement it by ourselves since it
isn't a huge amount of code.
I have reopened this issue for tracking this.
And I didn't find the javax.annotation.processing implementation there
(tracked by JIRA 6437).
Is there any completed implementation we can use?
If not, I guess we have to implement it by ourselves.
On Wed, Feb 17, 2010 at 10:40 PM, Mark Hindess
<ma...@googlemail.com> wrote:
>
> It isn't a huge amount of code, but out of curiosity why implement this
> from scratch rather than using:
>
> http://svn.apache.org/viewvc/tomcat/trunk/java/javax/annotation/
>
> (It was this commit that prompted me to look again at the dependencies
> that might fill gaps in our implementation.)
>
> Regards,
> Mark.
>
> In message <20...@eris.apache.org>, regisxu@apache.org
> writes:
>>
>> Author: regisxu
>> Date: Mon Feb 8 06:45:55 2010
>> New Revision: 907559
>>
>> URL: http://svn.apache.org/viewvc?rev=907559&view=rev
>> Log:
>> Apply patch for HARMONY-6436: [java6]implement javax.annotation package
>>
>> Added:
>> harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java
>> /javax/
>> harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java
>> /javax/annotation/
>> harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java
>> /javax/annotation/Generated.java (with props)
>> harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java
>> /javax/annotation/PostConstruct.java (with props)
>> harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java
>> /javax/annotation/PreDestroy.java (with props)
>> harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java
>> /javax/annotation/Resource.java (with props)
>> harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java
>> /javax/annotation/Resources.java (with props)
>> harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java
>> /org/apache/harmony/annotation/tests/javax/
>> harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java
>> /org/apache/harmony/annotation/tests/javax/annotation/
>> harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java
>> /org/apache/harmony/annotation/tests/javax/annotation/GeneratedTest.java (w
>> ith props)
>> harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java
>> /org/apache/harmony/annotation/tests/javax/annotation/PostConstructTest.java
>> (with props)
>> harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java
>> /org/apache/harmony/annotation/tests/javax/annotation/PreDestroyTest.java (
>> with props)
>> harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java
>> /org/apache/harmony/annotation/tests/javax/annotation/ResourceTest.java (wi
>> th props)
>> harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java
>> /org/apache/harmony/annotation/tests/javax/annotation/Resource_Authentication
>> TypeTest.java (with props)
>> harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java
>> /org/apache/harmony/annotation/tests/javax/annotation/ResourcesTest.java (w
>> ith props)
>>
>> Added: harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/j
>> ava/javax/annotation/Generated.java
>> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/mo
>> dules/annotation/src/main/java/javax/annotation/Generated.java?rev=907559&vie
>> w=auto
>> =============================================================================
> [SNIP]
>
>
--
Regards,
Ray Chen
javax.annotation (was: Re: svn commit: r907559)
Posted by Mark Hindess <ma...@googlemail.com>.
It isn't a huge amount of code, but out of curiosity why implement this
from scratch rather than using:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/annotation/
(It was this commit that prompted me to look again at the dependencies
that might fill gaps in our implementation.)
Regards,
Mark.
In message <20...@eris.apache.org>, regisxu@apache.org
writes:
>
> Author: regisxu
> Date: Mon Feb 8 06:45:55 2010
> New Revision: 907559
>
> URL: http://svn.apache.org/viewvc?rev=907559&view=rev
> Log:
> Apply patch for HARMONY-6436: [java6]implement javax.annotation package
>
> Added:
> harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java
> /javax/
> harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java
> /javax/annotation/
> harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java
> /javax/annotation/Generated.java (with props)
> harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java
> /javax/annotation/PostConstruct.java (with props)
> harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java
> /javax/annotation/PreDestroy.java (with props)
> harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java
> /javax/annotation/Resource.java (with props)
> harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/java
> /javax/annotation/Resources.java (with props)
> harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java
> /org/apache/harmony/annotation/tests/javax/
> harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java
> /org/apache/harmony/annotation/tests/javax/annotation/
> harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java
> /org/apache/harmony/annotation/tests/javax/annotation/GeneratedTest.java (w
> ith props)
> harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java
> /org/apache/harmony/annotation/tests/javax/annotation/PostConstructTest.java
> (with props)
> harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java
> /org/apache/harmony/annotation/tests/javax/annotation/PreDestroyTest.java (
> with props)
> harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java
> /org/apache/harmony/annotation/tests/javax/annotation/ResourceTest.java (wi
> th props)
> harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java
> /org/apache/harmony/annotation/tests/javax/annotation/Resource_Authentication
> TypeTest.java (with props)
> harmony/enhanced/classlib/branches/java6/modules/annotation/src/test/java
> /org/apache/harmony/annotation/tests/javax/annotation/ResourcesTest.java (w
> ith props)
>
> Added: harmony/enhanced/classlib/branches/java6/modules/annotation/src/main/j
> ava/javax/annotation/Generated.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/mo
> dules/annotation/src/main/java/javax/annotation/Generated.java?rev=907559&vie
> w=auto
> =============================================================================
[SNIP]