org.dynalang.mop
Interface ClassBasedMetaobjectProtocol
- All Superinterfaces:
- BaseMetaobjectProtocol, CallProtocol, MetaobjectProtocol
- All Known Implementing Classes:
- CompositeClassBasedMetaobjectProtocol, ListMetaobjectProtocol, MapMetaobjectProtocol
public interface ClassBasedMetaobjectProtocol
- extends MetaobjectProtocol
An interface that can be optionally implemented by any MOP if it is strictly
class-based (that is, the class of an object solely determines whether it
has authority over it or not).
- Version:
- $Id: $
- Author:
- Attila Szegedi
Method Summary |
boolean |
isAuthoritativeForClass(java.lang.Class clazz)
Returns whether this metaobject protocol has authority over objects of
the specified class. |
isAuthoritativeForClass
boolean isAuthoritativeForClass(java.lang.Class clazz)
- Returns whether this metaobject protocol has authority over objects of
the specified class. Note that if a MOP claims that it has authority
over objects of a certain class, it can still return
BaseMetaobjectProtocol.Results.noAuthority
for certain objects.
In that case - when used in CompositeClassBasedMetaobjectProtocol
- the other participating MOPs will also be given the chance to handle
the object after this MOP was given the chance first.
- Parameters:
clazz
- the class of the handled object
- Returns:
- true if this metaobject protocol has authority over objects of
the specified class, false otherwise.