本文整理了Java中javax.decorator.Decorator.<init>()
方法的一些代码示例,展示了Decorator.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Decorator.<init>()
方法的具体详情如下:
包路径:javax.decorator.Decorator
类名称:Decorator
方法名:<init>
暂无
代码示例来源:origin: javaee-samples/javaee7-samples
/**
* @author Arun Gupta
*/
@Decorator
public class MyDecorator implements Greeting {
@Inject
@Delegate
@Any
Greeting greeting;
@Override
public String greet(String name) {
return greeting.greet(name + " very much!");
}
}
代码示例来源:origin: javaee-samples/javaee7-samples
/**
* @author Arun Gupta
*/
@Decorator
@Priority(100)
public class MyDecorator implements Greeting {
@Inject
@Delegate
private Greeting greeting;
@Override
public String greet(String name) {
return greeting.greet(name + " very much!");
}
}
代码示例来源:origin: jersey/jersey
/**
* Decorator wraps the hello resource by stars.
*
* @author Petr Bouda
*/
@Decorator
public class HelloStarDecorator implements Hello {
@Inject
@Delegate
@Any
Hello account;
@Override
public String hello() {
return "***" + account.hello() + "***";
}
}
代码示例来源:origin: javaee-samples/javaee7-samples
@Decorator
@Priority(100)
public abstract class RequestDecorator implements HttpServletRequest, Serializable {
private static final long serialVersionUID = 1L;
@Inject
@Delegate
private HttpServletRequest request;
@Override
public String getParameter(String name) {
if ("decorated".equals(name)) {
return "true";
}
return request.getParameter(name);
}
}
代码示例来源:origin: org.jboss.jsr299.tck/jsr299-tck-impl
@Decorator
abstract class BrokenDecorator implements EspooLocal_Broken, Serializable
{
@Inject @Delegate EspooLocal_Broken espooLocal;
@Inject
public void init(District district) {}
}
代码示例来源:origin: org.jboss.jsr299.tck/jsr299-tck-impl
@Decorator
public class BazDecorator
{
@Inject @Delegate
private Baz<Object> baz;
}
代码示例来源:origin: org.jboss.jsr299.tck/jsr299-tck-impl
/**
* @author pmuir
*
*/
@Decorator
public class BazDecorator1 implements Baz
{
@Inject @Delegate Bazt bazt;
}
代码示例来源:origin: org.jboss.jsr299.tck/jsr299-tck-impl
/**
* @author pmuir
*
*/
@Decorator
public class BazDecorator implements Baz
{
@Inject @Delegate Bazt bazt;
}
代码示例来源:origin: org.jboss.jsr299.tck/jsr299-tck-impl
@Decorator
public class GraultSuperDecorator
{
@Inject @Delegate
private Grault<? super Integer> grault;
}
代码示例来源:origin: org.jboss.cdi.tck/cdi-tck-impl
@Decorator
public abstract class Decorator2 implements Ping {
@Inject
@Delegate
Ping ping;
}
代码示例来源:origin: org.jboss.cdi.tck/cdi-tck-impl
@Decorator
public class BravoDecorator implements Bravo {
@Inject
@Delegate
private Bravo bravo;
@Override
public String process() {
return bravo.process();
}
}
代码示例来源:origin: org.jboss.cdi.tck/cdi-tck-impl
@Decorator
public class AnimalDecorator implements Animal {
@Inject
@Delegate
Animal bean;
public String hello() {
return bean.hello() + " world!";
}
}
代码示例来源:origin: org.jboss.cdi.tck/cdi-tck-impl
@Decorator
public class AlphaDecorator implements Alpha {
@Inject
@Delegate
private Alpha alpha;
@Override
public String process() {
return alpha.process();
}
}
代码示例来源:origin: weld/core
@Decorator
public class CameraDecorator implements Camera {
@Inject
@Delegate
private Camera delegate;
public static int invocations = 0;
@Override
public void capture() {
invocations++;
delegate.capture();
}
}
代码示例来源:origin: org.jboss.jsr299.tck/jsr299-tck-impl
@Decorator
public class QuxDecorator
{
@Inject @Delegate
private Qux<String> qux;
}
代码示例来源:origin: org.jboss.jsr299.tck/jsr299-tck-impl
@Decorator
public class QuxListDecorator
{
@Inject @Delegate
private Qux<List<String>> qux;
}
代码示例来源:origin: org.jboss.jsr299.tck/jsr299-tck-impl
@Decorator
public class GarplyDecorator<T extends Animal>
{
@Inject @Delegate
private Garply<T> garply;
}
代码示例来源:origin: org.jboss.jsr299.tck/jsr299-tck-impl
@Decorator
public class FooObjectDecorator
{
@Inject @Delegate
private Foo<Object> foo;
}
代码示例来源:origin: org.jboss.jsr299.tck/jsr299-tck-impl
@Decorator
class MaarianhaminaDecorator
{
@Inject @Delegate Maarianhamina_Broken maarianHamina;
}
代码示例来源:origin: org.jboss.jsr299.tck/jsr299-tck-impl
@Decorator
class FooDecorator implements Foo
{
@Inject @Delegate Foo delegate;
public void bar()
{
if (!FooImpl.interceptorCalledFirst) FooImpl.decoratorCalledFirst = true;
delegate.bar();
}
}
内容来源于网络,如有侵权,请联系作者删除!