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 used as either target or
property identifier solely determines whether it has authority over it or
not). The provision for property identifiers is put in place so that MOPs
can implement special "metaproperties" (i.e. "prototype" in JavaScript) by
using property IDs of classes private to their implementation.
- 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.Result.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.