commons-commits mailing list archives

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

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

Added:
    commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter/IsAnonymousClass.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=1135516&r1=1135515&r2=1135516&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:15:46 2011
@@ -193,6 +193,16 @@ public final class Filters
     }
 
     /**
+     * Creates a new {@code Filter} that checks the Class found in the ClassPath is an anonymous
class.
+     *
+     * @return a new {@code Filter} instance.
+     */
+    public static Filter isAnonymous()
+    {
+        return new IsAnonymousClass();
+    }
+
+    /**
      * Creates a new {@code Filter} that checks the Class found in the ClassPath inherits
the given Class
      * or implements the given Interface.
      *

Added: commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter/IsAnonymousClass.java
URL: http://svn.apache.org/viewvc/commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter/IsAnonymousClass.java?rev=1135516&view=auto
==============================================================================
--- commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter/IsAnonymousClass.java
(added)
+++ commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/filter/IsAnonymousClass.java
Tue Jun 14 12:15:46 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 anonymous.
+ */
+final class IsAnonymousClass
+    extends AbstractFilter
+{
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean matches( Class<?> clazz )
+    {
+        return clazz.isAnonymousClass();
+    }
+
+}

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

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

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



Mime
View raw message