forked from fanruan/design
hugh
8 years ago
4 changed files with 62 additions and 2 deletions
@ -0,0 +1,30 @@
|
||||
package com.fr.design.formula; |
||||
|
||||
import com.fr.stable.fun.mark.API; |
||||
import com.fr.stable.script.FunctionDef; |
||||
|
||||
@API(level = FunctionGroupDefineProvider.CURRENT_LEVEL) |
||||
public abstract class AbstractFunctionGroup implements FunctionGroupDefineProvider { |
||||
|
||||
@Override |
||||
public int currentAPILevel() { |
||||
return CURRENT_LEVEL; |
||||
} |
||||
|
||||
@Override |
||||
public String mark4Provider() { |
||||
return getClass().getName(); |
||||
} |
||||
|
||||
@Override |
||||
public NameAndDescription[] getDescriptions() { |
||||
FunctionDef[] funcs = getFunctionDefs(); |
||||
int count = funcs.length; |
||||
FunctionDefNAD[] nads = new FunctionDefNAD[count]; |
||||
for (int i = 0; i < count; i ++) { |
||||
nads[i] = new FunctionDefNAD(funcs[i]); |
||||
} |
||||
return nads; |
||||
} |
||||
|
||||
} |
@ -0,0 +1,12 @@
|
||||
package com.fr.design.formula; |
||||
|
||||
import com.fr.design.formula.FunctionGroup; |
||||
import com.fr.stable.fun.mark.Mutable; |
||||
import com.fr.stable.script.FunctionDef; |
||||
|
||||
public interface FunctionGroupDefineProvider extends Mutable,FunctionGroup{ |
||||
int CURRENT_LEVEL = 1; |
||||
String MARK_STRING = "FunctionGroupDefineProvider"; |
||||
|
||||
public FunctionDef[] getFunctionDefs(); |
||||
} |
Loading…
Reference in new issue