forked from fanruan/finekit
zjz1993
5 years ago
5 changed files with 65 additions and 1 deletions
@ -0,0 +1,14 @@
|
||||
package com.fanruan.api.err; |
||||
|
||||
/** |
||||
* 和数据集工具有关的异常 |
||||
* */ |
||||
public class TableDataException extends com.fr.general.data.TableDataException{ |
||||
public TableDataException(String msg){ |
||||
super(msg); |
||||
} |
||||
|
||||
public TableDataException (String msg, Throwable error){ |
||||
super(msg, error); |
||||
} |
||||
} |
@ -0,0 +1,26 @@
|
||||
package com.fanruan.api.plugin; |
||||
|
||||
import com.fr.plugin.ExtraClassManager; |
||||
import com.fr.stable.fun.mark.Mutable; |
||||
|
||||
import java.util.Set; |
||||
|
||||
public class PluginKit { |
||||
/** |
||||
* 返回指定集合的不可变数组 |
||||
* @param string 字符串 |
||||
* @return 数组 |
||||
* */ |
||||
public <T extends Mutable> Set<T> getArray(String string) { |
||||
return ExtraClassManager.getInstance().getArray(string); |
||||
} |
||||
|
||||
/** |
||||
* 返回指定集合的不可变数组 |
||||
* @param string 字符串 |
||||
* @return 数组 |
||||
* */ |
||||
public <T extends Mutable> Set<T> getArray(String string, Mutable m) { |
||||
return ExtraClassManager.getInstance().getArray(string, m); |
||||
} |
||||
} |
@ -0,0 +1,13 @@
|
||||
package com.fanruan.api.plugin; |
||||
|
||||
import org.junit.Assert; |
||||
import org.junit.Test; |
||||
|
||||
public class PluginKitTest { |
||||
@Test |
||||
public void getArray(){ |
||||
PluginKit p1 = new PluginKit(); |
||||
TestExtraClass p2 = new TestExtraClass(); |
||||
Assert.assertEquals(p1.getArray("abcd"), p2.getArray("abcd")); |
||||
} |
||||
} |
@ -0,0 +1,12 @@
|
||||
package com.fanruan.api.plugin; |
||||
import com.fr.plugin.injectable.PluginSingleInjection; |
||||
|
||||
public class TestExtraClass extends com.fr.plugin.AbstractExtraClassManager{ |
||||
protected boolean mountSpecific(PluginSingleInjection injection){ |
||||
return true; |
||||
} |
||||
|
||||
protected boolean demountSpecific(PluginSingleInjection injection){ |
||||
return true; |
||||
} |
||||
} |
Loading…
Reference in new issue