org.apache.logging.log4j.core.config.plugins.util
Class PluginManager.PluginTest

java.lang.Object
  extended by org.apache.logging.log4j.core.config.plugins.util.PluginManager.PluginTest
All Implemented Interfaces:
ResolverUtil.Test
Enclosing class:
PluginManager

public static class PluginManager.PluginTest
extends Object
implements ResolverUtil.Test

A Test that checks to see if each class is annotated with a specific annotation. If it is, then the test returns true, otherwise false.


Constructor Summary
PluginManager.PluginTest(Class<?> isA)
          Constructs an AnnotatedWith test for the specified annotation type.
 
Method Summary
 boolean doesMatchClass()
           
 boolean doesMatchResource()
           
 boolean matches(Class<?> type)
          Returns true if the type is annotated with the class provided to the constructor.
 boolean matches(URI resource)
          Test for a resource.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PluginManager.PluginTest

public PluginManager.PluginTest(Class<?> isA)
Constructs an AnnotatedWith test for the specified annotation type.

Parameters:
isA - The class to compare against.
Method Detail

matches

public boolean matches(Class<?> type)
Returns true if the type is annotated with the class provided to the constructor.

Specified by:
matches in interface ResolverUtil.Test
Parameters:
type - The type to check for.
Returns:
true if the Class is of the specified type.

toString

public String toString()
Overrides:
toString in class Object

matches

public boolean matches(URI resource)
Description copied from interface: ResolverUtil.Test
Test for a resource.

Specified by:
matches in interface ResolverUtil.Test
Parameters:
resource - The URI to the resource.
Returns:
true if the resource matches.

doesMatchClass

public boolean doesMatchClass()
Specified by:
doesMatchClass in interface ResolverUtil.Test

doesMatchResource

public boolean doesMatchResource()
Specified by:
doesMatchResource in interface ResolverUtil.Test


Copyright © 1999-2014 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.