You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2012/02/12 22:08:04 UTC

svn commit: r1243333 - in /commons/proper/digester/trunk/annotations-processor/src/main/java/org: ./ apache/ apache/commons/ apache/commons/digester3/ apache/commons/digester3/annotations/ apache/commons/digester3/annotations/processor/

Author: simonetripodi
Date: Sun Feb 12 21:08:04 2012
New Revision: 1243333

URL: http://svn.apache.org/viewvc?rev=1243333&view=rev
Log:
initial checkin of DigesterAnnotationsProcessor stuff

Added:
    commons/proper/digester/trunk/annotations-processor/src/main/java/org/
    commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/
    commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/
    commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/
    commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/
    commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/
    commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/DigesterAnnotationsProcessor.java   (with props)
    commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/package-info.java   (with props)

Added: commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/DigesterAnnotationsProcessor.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/DigesterAnnotationsProcessor.java?rev=1243333&view=auto
==============================================================================
--- commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/DigesterAnnotationsProcessor.java (added)
+++ commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/DigesterAnnotationsProcessor.java Sun Feb 12 21:08:04 2012
@@ -0,0 +1,78 @@
+package org.apache.commons.digester3.annotations.processor;
+
+/*
+ * 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.
+ */
+
+import static java.util.Arrays.asList;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.annotation.processing.AbstractProcessor;
+import javax.annotation.processing.RoundEnvironment;
+import javax.lang.model.element.TypeElement;
+
+import org.apache.commons.digester3.annotations.rules.BeanPropertySetter;
+import org.apache.commons.digester3.annotations.rules.CallMethod;
+import org.apache.commons.digester3.annotations.rules.CallParam;
+import org.apache.commons.digester3.annotations.rules.CreationRule;
+import org.apache.commons.digester3.annotations.rules.FactoryCreate;
+import org.apache.commons.digester3.annotations.rules.ObjectCreate;
+import org.apache.commons.digester3.annotations.rules.PathCallParam;
+import org.apache.commons.digester3.annotations.rules.SetNext;
+import org.apache.commons.digester3.annotations.rules.SetProperty;
+import org.apache.commons.digester3.annotations.rules.SetRoot;
+import org.apache.commons.digester3.annotations.rules.SetTop;
+
+/**
+ * @since 3.3
+ */
+public class DigesterAnnotationsProcessor
+    extends AbstractProcessor
+{
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Set<String> getSupportedAnnotationTypes()
+    {
+        return new HashSet<String>( asList( BeanPropertySetter.class.getName(),
+                                            CallMethod.class.getName(),
+                                            CallParam.class.getName(),
+                                            CreationRule.class.getName(),
+                                            FactoryCreate.class.getName(),
+                                            ObjectCreate.class.getName(),
+                                            PathCallParam.class.getName(),
+                                            SetNext.class.getName(),
+                                            SetProperty.class.getName(),
+                                            SetRoot.class.getName(),
+                                            SetTop.class.getName() ) );
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean process( Set<? extends TypeElement> annotations, RoundEnvironment environment )
+    {
+        return false;
+    }
+
+}

Propchange: commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/DigesterAnnotationsProcessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/DigesterAnnotationsProcessor.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/DigesterAnnotationsProcessor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/package-info.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/package-info.java?rev=1243333&view=auto
==============================================================================
--- commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/package-info.java (added)
+++ commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/package-info.java Sun Feb 12 21:08:04 2012
@@ -0,0 +1,24 @@
+/**
+ * The <code>annotations.processor</code> package contains a Java6
+ * Annotations Processor implementation for Digester annotations rules.
+ */
+package org.apache.commons.digester3.annotations.processor;
+
+/*
+ * 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.
+ */

Propchange: commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/package-info.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: commons/proper/digester/trunk/annotations-processor/src/main/java/org/apache/commons/digester3/annotations/processor/package-info.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain