Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5F78562D6 for ; Tue, 14 Jun 2011 12:16:11 +0000 (UTC) Received: (qmail 37301 invoked by uid 500); 14 Jun 2011 12:16:11 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 37249 invoked by uid 500); 14 Jun 2011 12:16:11 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 37241 invoked by uid 99); 14 Jun 2011 12:16:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Jun 2011 12:16:11 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Jun 2011 12:16:08 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1C6E023889BB; Tue, 14 Jun 2011 12:15:47 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@commons.apache.org From: simonetripodi@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110614121547.1C6E023889BB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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