commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1135518 - in /commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter: Filters.java IsEnum.java
Date Tue, 14 Jun 2011 12:19:26 GMT
Author: simonetripodi
Date: Tue Jun 14 12:19:26 2011
New Revision: 1135518

URL: http://svn.apache.org/viewvc?rev=1135518&view=rev
Log:
first checkin of isEnum() Filter

Added:
    commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter/IsEnum.java
  (with props)
Modified:
    commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter/Filters.java

Modified: commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter/Filters.java
URL: http://svn.apache.org/viewvc/commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter/Filters.java?rev=1135518&r1=1135517&r2=1135518&view=diff
==============================================================================
--- commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter/Filters.java
(original)
+++ commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter/Filters.java
Tue Jun 14 12:19:26 2011
@@ -225,6 +225,16 @@ public final class Filters
     }
 
     /**
+     * Creates a new {@code Filter} that checks the Class found in the ClassPath is an Enumeration.
+     *
+     * @return a new {@code Filter} instance.
+     */
+    public static Filter isEnum()
+    {
+        return new IsEnum();
+    }
+
+    /**
      * Creates a new {@code Filter} that checks the Class found in the ClassPath is a final
Class.
      *
      * @return a new {@code Filter} instance.

Added: commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter/IsEnum.java
URL: http://svn.apache.org/viewvc/commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter/IsEnum.java?rev=1135518&view=auto
==============================================================================
--- commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter/IsEnum.java
(added)
+++ commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter/IsEnum.java
Tue Jun 14 12:19:26 2011
@@ -0,0 +1,37 @@
+package org.apache.commons.meiyo.classpath.filter;
+
+/*
+ * 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.
+ */
+
+/**
+ * A filter that verifies the Class found is an Enumeration.
+ */
+final class IsEnum
+    extends AbstractFilter
+{
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean matches( Class<?> clazz )
+    {
+        return clazz.isEnum();
+    }
+
+}

Propchange: commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter/IsEnum.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter/IsEnum.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Propchange: commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter/IsEnum.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message