org.apache.commons.clazz.reflect
Class ReflectedGroupClazzLoader
java.lang.Object
org.apache.commons.clazz.ClazzLoader
org.apache.commons.clazz.common.GroupClazzLoader
org.apache.commons.clazz.reflect.ReflectedGroupClazzLoader
public class ReflectedGroupClazzLoader
- extends GroupClazzLoader
A clazz loader that groups multiple ReflectedClazzLoaders
.
Its primary purpose is to optimize the methods that are executed the same way
by all ReflectedClazzLoaders
, specifically the
getClazzName()
method, which is always the same as the
corresponding class name
- Version:
- $Id: ReflectedGroupClazzLoader.java 155436 2005-02-26 13:17:48Z dirkv $
- Author:
- Dmitri Plotnikov
Method Summary |
boolean |
canAddClazzLoader(ClazzLoader loader)
Returns true if the supplied loader "belongs" in the group and can be
added to it. |
String |
getClazzName(Object instance)
Returns the clazz name for the supplied instance. |
boolean |
isMember(Object instance)
Returns true iff this group has a member loader that has or can construct
a Clazz for the supplied instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReflectedGroupClazzLoader
public ReflectedGroupClazzLoader(ModelClazzLoader modelClazzLoader)
canAddClazzLoader
public boolean canAddClazzLoader(ClazzLoader loader)
- Description copied from class:
GroupClazzLoader
- Returns true if the supplied loader "belongs" in the group and can be
added to it. The default implementation returns true.
- Overrides:
canAddClazzLoader
in class GroupClazzLoader
isMember
public boolean isMember(Object instance)
- Description copied from class:
GroupClazzLoader
- Returns true iff this group has a member loader that has or can construct
a Clazz for the supplied instance.
- Overrides:
isMember
in class GroupClazzLoader
- See Also:
ClazzLoader.isMember(java.lang.Object)
getClazzName
public String getClazzName(Object instance)
- Description copied from class:
ClazzLoader
- Returns the clazz name for the supplied instance. Returns
null
if it cannot produce a clazz name for the instance.
- Overrides:
getClazzName
in class GroupClazzLoader
- See Also:
ClazzLoader.getClazzName(java.lang.Object)
Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.