|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dynalang.mop.impl.AutoDiscovery
public class AutoDiscovery
Provides methods for automatic discovery of all metaobject protocols listed in the /META-INF/services/org.dynalang.mop.BaseMetaobjectProtocol resources of all JAR files for a particular class loader.
Method Summary | |
---|---|
static BaseMetaobjectProtocol[] |
discoverBaseMetaobjectProtocols()
Returns an instance of all metaobject protocol classes that are declared in the /META-INF/services/org.dynalang.mop.BaseMetaobjectProtocol resources of all JAR files in the current thread's context class loader's classpath. |
static BaseMetaobjectProtocol[] |
discoverBaseMetaobjectProtocols(java.lang.ClassLoader cl)
Returns an instance of all metaobject protocol classes that are declared in the /META-INF/services/org.dynalang.mop.BaseMetaobjectProtocol resources of all JAR files in the specified class loader's classpath. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static BaseMetaobjectProtocol[] discoverBaseMetaobjectProtocols() throws java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException
MetaobjectProtocolAdaptor.toMetaobjectProtocols(BaseMetaobjectProtocol[])
if your code uses the full MOP interface instead of the base one.
java.io.IOException
- if there is a problem reading classpath resources
java.lang.InstantiationException
- if a class declared in a service list can
not be instantiated
java.lang.IllegalAccessException
- if a class declared in a service list is
not public or does not have a publicly visible default constructor
java.lang.ClassNotFoundException
- if a class declared in a service list is
not found
java.lang.ClassCastException
- if a class declared in a service list does
not implement the BaseMetaobjectProtocol
interface.public static BaseMetaobjectProtocol[] discoverBaseMetaobjectProtocols(java.lang.ClassLoader cl) throws java.io.IOException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.ClassNotFoundException
cl
- the class loader within which the MOPs are discovered. null
can be used to denote the system class loader
.
MetaobjectProtocolAdaptor.toMetaobjectProtocols(BaseMetaobjectProtocol[])
if your code uses the full MOP interface instead of the base one.
java.io.IOException
- if there is a problem reading classpath resources
java.lang.InstantiationException
- if a class declared in a service list can
not be instantiated
java.lang.IllegalAccessException
- if a class declared in a service list is
not public or does not have a publicly visible default constructor
java.lang.ClassNotFoundException
- if a class declared in a service list is
not found
java.lang.ClassCastException
- if a class declared in a service list does
not implement the BaseMetaobjectProtocol
interface.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |