public class PluginDescriptorImpl2
extends org.processmining.framework.plugin.impl.AbstractPluginDescriptor
| Constructor and Description |
|---|
PluginDescriptorImpl2(java.lang.Class<?> type,
java.lang.Class<? extends org.processmining.framework.plugin.PluginContext> acceptedContext,
org.processmining.framework.packages.PackageDescriptor pack) |
PluginDescriptorImpl2(java.lang.reflect.Method method,
org.processmining.framework.packages.PackageDescriptor pack) |
PluginDescriptorImpl2(java.lang.String className,
java.lang.String name,
java.lang.Class<?>[] parTypes,
org.processmining.framework.packages.PackageDescriptor pack) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(org.processmining.framework.plugin.PluginDescriptor plugin)
Compares this plugin with another plugins.
|
boolean |
equals(java.lang.Object other)
return equality of plugins.
|
protected java.lang.Object[] |
execute(org.processmining.framework.plugin.PluginContext context,
int methodIndex,
java.lang.Object... allArgs)
In this method, the pluginDescriptor should do the actual work of
concstructing the result.
|
protected java.lang.reflect.Method |
findMethod(java.lang.Object[] allArgs) |
<T extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<T> annotationClass)
Return the annotation of the given class carried by this plugin.
|
<T extends java.lang.annotation.Annotation> |
getAnnotation(java.lang.Class<T> annotationClass,
int methodIndex)
Return the annotation of the method at the given index.
|
java.lang.String[] |
getCategories()
Return the set of categories.
|
java.lang.Class<? extends org.processmining.framework.plugin.PluginContext> |
getContextType(int methodIndex)
Returns the context type required by the method at index methodIndex.
|
java.lang.String |
getHelp()
Return the help / description of the plugin.
|
org.processmining.framework.plugin.PluginDescriptorID |
getID()
returns the ID of this Plugin.
|
int |
getIndexInMethod(int methodIndex,
int parameterIndex)
Returns the index of the global parameter to the index of that parameter
in the given method.
|
int |
getIndexInParameterNames(int methodIndex,
int methodParameterIndex)
Returns the index of the method parameter of the given method in the list
of global parameters.
|
java.lang.String[] |
getKeywords()
Return the set of keywords.
|
java.lang.String |
getMethodHelp(int methodIndex)
Return the help / description of the given method, if specified.
|
java.lang.String |
getMethodLabel(int methodIndex)
Return the label of the given method, if specified.
|
int |
getMostSignificantResult()
Returns the index in the result array of the most significant result for
this plugin
|
java.lang.String |
getName()
Return the name of the plugin.
|
int |
getNumberOfMethods()
Return the number of methods in this plugin.
|
org.processmining.framework.packages.PackageDescriptor |
getPackage()
Return the package where the plug-in resides.
|
java.util.List<java.lang.String> |
getParameterNames()
Returns a list of labels that represent the possible parameters of this
plugin.
|
java.util.List<java.lang.String> |
getParameterNames(int methodIndex)
Returns a list of labels that represent the required parameters of the
method at the given index.
|
java.util.List<java.util.List<java.lang.Class<?>>> |
getParameterTypes()
returns a list of size
getNumberOfMethods(), such that
element at index i of the list equals
getParameterTypes(i) |
java.util.List<java.lang.Class<?>> |
getParameterTypes(int methodIndex)
Returns a list of types that represent the required parameters of the
method at the given index.
|
java.lang.String |
getPluginParameterName(int methodIndex,
int parameterIndex)
Return the label of the parameter at index
parameterIndex of
the method at methodIndex. |
java.lang.Class<?> |
getPluginParameterType(int methodIndex,
int parameterIndex)
Return the type of the parameter at index
parameterIndex of
the method at methodIndex. |
java.util.List<java.lang.String> |
getReturnNames()
returns the types of the objects returned if this plugin is invoked, in
the order in which they are returned
|
java.util.List<java.lang.Class<? extends java.lang.Object>> |
getReturnTypes()
returns the labels of the objects returned if this plugin is invoked, in
the order in which they are returned
|
java.util.Set<java.lang.Class<?>> |
getTypesAtParameterIndex(int index)
Returns a list of types that can be accepted for the parameter at index
globalParameterIndex. |
boolean |
handlesCancel()
Returns whether the plugin handles termination itself.
|
boolean |
hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Check if this plugin carries the given annotation.
|
boolean |
hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass,
int methodIndex)
Check if the method at the given index carries the given annotation.
|
int |
hashCode()
return hashcode
|
boolean |
isUserAccessible()
Returns true if this plugin can be used by the end-users.
|
boolean |
meetsLevelThreshold()
Return whether this plug-in meets the level threshold.
|
boolean |
meetsQualityThreshold()
Return whether this plug-in meets the quality threshold.
|
java.lang.String |
toString()
Returns a String representation of the plugin
|
public PluginDescriptorImpl2(java.lang.reflect.Method method,
org.processmining.framework.packages.PackageDescriptor pack)
throws java.lang.Exception
java.lang.Exceptionpublic PluginDescriptorImpl2(java.lang.Class<?> type,
java.lang.Class<? extends org.processmining.framework.plugin.PluginContext> acceptedContext,
org.processmining.framework.packages.PackageDescriptor pack)
throws java.lang.Exception
java.lang.Exceptionpublic PluginDescriptorImpl2(java.lang.String className,
java.lang.String name,
java.lang.Class<?>[] parTypes,
org.processmining.framework.packages.PackageDescriptor pack)
throws java.lang.Exception
java.lang.Exceptionpublic org.processmining.framework.packages.PackageDescriptor getPackage()
org.processmining.framework.plugin.PluginDescriptorpublic int getMostSignificantResult()
org.processmining.framework.plugin.PluginDescriptorpublic boolean hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
org.processmining.framework.plugin.PluginDescriptorpublic <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
org.processmining.framework.plugin.PluginDescriptorpublic java.lang.String getName()
org.processmining.framework.plugin.PluginDescriptorpublic int hashCode()
org.processmining.framework.plugin.PluginDescriptorhashCode in interface org.processmining.framework.plugin.PluginDescriptorhashCode in class java.lang.Objectpublic boolean equals(java.lang.Object other)
org.processmining.framework.plugin.PluginDescriptorequals in interface org.processmining.framework.plugin.PluginDescriptorequals in class java.lang.Objectpublic java.lang.String toString()
org.processmining.framework.plugin.PluginDescriptortoString in interface org.processmining.framework.plugin.PluginDescriptortoString in class java.lang.Objectprotected java.lang.Object[] execute(org.processmining.framework.plugin.PluginContext context,
int methodIndex,
java.lang.Object... allArgs)
throws java.lang.Exception
org.processmining.framework.plugin.impl.AbstractPluginDescriptorexecute in class org.processmining.framework.plugin.impl.AbstractPluginDescriptorjava.lang.Exceptionprotected java.lang.reflect.Method findMethod(java.lang.Object[] allArgs)
public java.util.List<java.lang.Class<? extends java.lang.Object>> getReturnTypes()
public java.util.List<java.lang.Class<?>> getParameterTypes(int methodIndex)
org.processmining.framework.plugin.PluginDescriptormethodIndex requires exectly the parameter types as provided
in the returned list, in that order.public java.lang.Class<?> getPluginParameterType(int methodIndex,
int parameterIndex)
org.processmining.framework.plugin.PluginDescriptorparameterIndex of
the method at methodIndex.methodIndex - 0 <= methodIndex < getNumberOfMethods()parameterIndex - 0 <= parameterIndex < getParameterTypes().size()public java.util.List<java.util.List<java.lang.Class<?>>> getParameterTypes()
org.processmining.framework.plugin.PluginDescriptorgetNumberOfMethods(), such that
element at index i of the list equals
getParameterTypes(i)public java.util.List<java.lang.String> getParameterNames()
org.processmining.framework.plugin.PluginDescriptorpublic java.util.Set<java.lang.Class<?>> getTypesAtParameterIndex(int index)
org.processmining.framework.plugin.PluginDescriptorglobalParameterIndex. The parameter index is global, i.e.
not method specific. Instead, for each type t in the set
returned by this method it is guaranteed that there is at least one
method (suppose at index i), such that
getParameterType(i, getIndexInMethod(i, globalParameterIndex)) == tindex - 0 <= globalParameterIndex < getParameterNames().size()public int getNumberOfMethods()
public java.util.List<java.lang.String> getParameterNames(int methodIndex)
org.processmining.framework.plugin.PluginDescriptormethodIndex requires exactly the parameter labels as
provided in the returned list, in that order.public java.lang.String getPluginParameterName(int methodIndex,
int parameterIndex)
org.processmining.framework.plugin.PluginDescriptorparameterIndex of
the method at methodIndex.methodIndex - 0 <= methodIndex < getNumberOfMethods()parameterIndex - 0 <= parameterIndex < getParameterTypes(methodIndex).size()public java.util.List<java.lang.String> getReturnNames()
public org.processmining.framework.plugin.PluginDescriptorID getID()
org.processmining.framework.plugin.PluginDescriptorpublic java.lang.Class<? extends org.processmining.framework.plugin.PluginContext> getContextType(int methodIndex)
org.processmining.framework.plugin.PluginDescriptormethodIndex - 0 <= methodIndex < getNumberOfMethods()public int compareTo(org.processmining.framework.plugin.PluginDescriptor plugin)
org.processmining.framework.plugin.PluginDescriptorgetName().toLowerCase() for comparing. Only if names are
equal, then the IDs are used for comparison. Comparison should be
name-based between different implementing classes.public int getIndexInParameterNames(int methodIndex,
int methodParameterIndex)
org.processmining.framework.plugin.PluginDescriptormethodIndex - 0 <= methodIndex < getNumberOfMethods()methodParameterIndex - 0 <= methodParameterIndex < getParameterNames(methodIndex).size()0 <= return < getParameterNames().size()public int getIndexInMethod(int methodIndex,
int parameterIndex)
org.processmining.framework.plugin.PluginDescriptormethodIndex - 0 <= methodIndex < getNumberOfMethods()parameterIndex - 0 <= globalParameterIndex < getParameterNames().size()-1 <= return < getParameterNames(methodIndex).size()public java.lang.String getMethodLabel(int methodIndex)
org.processmining.framework.plugin.PluginDescriptorpublic boolean isUserAccessible()
org.processmining.framework.plugin.PluginDescriptorpublic boolean handlesCancel()
org.processmining.framework.plugin.PluginDescriptorpublic <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass,
int methodIndex)
org.processmining.framework.plugin.PluginDescriptorpublic boolean hasAnnotation(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass,
int methodIndex)
org.processmining.framework.plugin.PluginDescriptorpublic java.lang.String getHelp()
org.processmining.framework.plugin.PluginDescriptorpublic java.lang.String getMethodHelp(int methodIndex)
org.processmining.framework.plugin.PluginDescriptorpublic java.lang.String[] getKeywords()
org.processmining.framework.plugin.PluginDescriptorpublic java.lang.String[] getCategories()
org.processmining.framework.plugin.PluginDescriptorpublic boolean meetsQualityThreshold()
org.processmining.framework.plugin.PluginDescriptorpublic boolean meetsLevelThreshold()
org.processmining.framework.plugin.PluginDescriptor