本文整理汇总了Java中org.cubeengine.dirigent.formatter.reflected.ReflectedFormatter类的典型用法代码示例。如果您正苦于以下问题:Java ReflectedFormatter类的具体用法?Java ReflectedFormatter怎么用?Java ReflectedFormatter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ReflectedFormatter类属于org.cubeengine.dirigent.formatter.reflected包,在下文中一共展示了ReflectedFormatter类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testWithoutFormatMethods
import org.cubeengine.dirigent.formatter.reflected.ReflectedFormatter; //导入依赖的package包/类
@Test(expected = AnnotationMissingException.class)
public void testWithoutFormatMethods()
{
@Names("test")
class EmptyFormatter extends ReflectedFormatter
{}
new EmptyFormatter();
}
示例2: testWithoutNames
import org.cubeengine.dirigent.formatter.reflected.ReflectedFormatter; //导入依赖的package包/类
@Test(expected = AnnotationMissingException.class)
public void testWithoutNames()
{
class UnnamedFormatter extends ReflectedFormatter
{
@Format
public Component format(String s) {return null;}
}
new UnnamedFormatter();
}
示例3: testPrivateFormatMethod
import org.cubeengine.dirigent.formatter.reflected.ReflectedFormatter; //导入依赖的package包/类
@Test(expected = AnnotationMissingException.class)
public void testPrivateFormatMethod()
{
@Names("test")
class UnnamedFormatter extends ReflectedFormatter
{
@Format
private Component format(String s) {return null;}
}
new UnnamedFormatter();
}
示例4: testInvalidReturnType
import org.cubeengine.dirigent.formatter.reflected.ReflectedFormatter; //导入依赖的package包/类
@Test(expected = InvalidFormatMethodException.class)
public void testInvalidReturnType()
{
@Names("test")
class InvalidReturn extends ReflectedFormatter {
@Format
public void test(String s) {}
}
new InvalidReturn();
}
示例5: testNoInput
import org.cubeengine.dirigent.formatter.reflected.ReflectedFormatter; //导入依赖的package包/类
@Test(expected = InvalidFormatMethodException.class)
public void testNoInput()
{
@Names("test")
class NoInputs extends ReflectedFormatter {
@Format
public void test() {}
}
new NoInputs();
}
示例6: testWrongParamsTwoParameters
import org.cubeengine.dirigent.formatter.reflected.ReflectedFormatter; //导入依赖的package包/类
@Test(expected = InvalidFormatMethodException.class)
public void testWrongParamsTwoParameters()
{
@Names("test")
class WrongParams extends ReflectedFormatter {
@Format
public Component test(String s, Integer i) {return null;}
}
new WrongParams();
}
示例7: testWrongParamsThreeParametersWithContext
import org.cubeengine.dirigent.formatter.reflected.ReflectedFormatter; //导入依赖的package包/类
@Test(expected = InvalidFormatMethodException.class)
public void testWrongParamsThreeParametersWithContext()
{
@Names("test")
class WrongParams extends ReflectedFormatter {
@Format
public Component test(String s, Context c, Integer i) {return null;}
}
new WrongParams();
}
示例8: testWrongParamsThreeParametersWithArguments
import org.cubeengine.dirigent.formatter.reflected.ReflectedFormatter; //导入依赖的package包/类
@Test(expected = InvalidFormatMethodException.class)
public void testWrongParamsThreeParametersWithArguments()
{
@Names("test")
class WrongParams extends ReflectedFormatter {
@Format
public Component test(String s, Integer i, Arguments a) {return null;}
}
new WrongParams();
}
示例9: testWrongParamsMoreParameters
import org.cubeengine.dirigent.formatter.reflected.ReflectedFormatter; //导入依赖的package包/类
@Test(expected = InvalidFormatMethodException.class)
public void testWrongParamsMoreParameters()
{
@Names("test")
class WrongParams extends ReflectedFormatter {
@Format
public Component test(String s, Context c, Arguments a, Integer i) {return null;}
}
new WrongParams();
}