Author: michiel
Date: 2009-07-07 17:48:27 +0200 (Tue, 07 Jul 2009)
New Revision: 36632
Modified:
mmbase/trunk/core/src/main/java/org/mmbase/module/core/MMObjectBuilder.java
Log:
Made the return type of the getFunctiosn function a constant, to avoid
instantiationg it many times (e.g. for every query result which needs a
specialized 'ResultBuilder'
Modified:
mmbase/trunk/core/src/main/java/org/mmbase/module/core/MMObjectBuilder.java
===================================================================
--- mmbase/trunk/core/src/main/java/org/mmbase/module/core/MMObjectBuilder.java
2009-07-07 15:36:14 UTC (rev 36631)
+++ mmbase/trunk/core/src/main/java/org/mmbase/module/core/MMObjectBuilder.java
2009-07-07 15:48:27 UTC (rev 36632)
@@ -276,14 +276,15 @@
addFunction(wrapFunction);
}
+ private static final ReturnType<Collection<? extends Function>>
RETURNTYPE_COLLECTION = new ReturnType<Collection<? extends
Function>>(Collection.class, "Collection");
/**
* Every Function Provider provides least the 'getFunctions' function,
which returns a Set of all functions which it provides.
* This is overridden from FunctionProvider, because this one needs to be
(also) a NodeFunction
* @since MMBase-1.8
*/
protected Function<Collection<? extends Function>> getFunctions = new
NodeFunction<Collection<? extends Function>>("getFunctions",
-
Parameter.emptyArray(),
-
new ReturnType<Collection<? extends
Function>>(Collection.class, "Collection")) {
+
Parameter.emptyArray(),
RETURNTYPE_COLLECTION) {
+
{
setDescription("The 'getFunctions' returns a Map of al
Function object which are available on this FunctionProvider");
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs