quietlyInvokeMethodsWithAnnotation
public static boolean quietlyInvokeMethodsWithAnnotation(Class<? extends Annotation> annotation,
Object instance,
ComponentLog logger,
Object... args)
Invokes all methods on the given instance that have been annotated with
the given annotation. If the signature of the method that is defined in
instance uses 1 or more parameters, those parameters must be
specified by the args parameter. However, if more arguments
are supplied by the args parameter than needed, the extra
arguments will be ignored.
- Parameters:
annotation - annotation
instance - instance
logger - the ComponentLog to use for logging any errors. If null,
will use own logger, but that will not generate bulletins or easily tie
to the Processor's log messages.
args - args
- Returns:
true if all appropriate methods were invoked and
returned without throwing an Exception, false if one of the
methods threw an Exception or could not be invoked; if false
is returned, an error will have been logged.