Package org.jboss.cdi.tck.util.annotated

Examples of org.jboss.cdi.tck.util.annotated.AnnotatedMethodWrapper.replaceParameters()


                methods.add(wrappedMethod);
            } else if (method.getJavaMember().getName().equals("initializer")) {

                AnnotatedMethodWrapper<? super Grocery> methodWrapper = new AnnotatedMethodWrapper(method, this, true);

                methodWrapper.replaceParameters(new AnnotatedParameterWrapper(method.getParameters().get(0), methodWrapper, false,
                        new CheapLiteral()) {
                    @Override
                    public Type getBaseType() {
                        getBaseTypeOfInitializerTropicalFruitParameterUsed = true;
                        return TropicalFruit.class;
View Full Code Here


                methods.add(wrappedMethod);
            } else if (method.getJavaMember().getName().equals("initializer")) {

                AnnotatedMethodWrapper<? super Grocery> methodWrapper = new AnnotatedMethodWrapper(method, this, true);

                methodWrapper.replaceParameters(new AnnotatedParameterWrapper(method.getParameters().get(0), methodWrapper, false,
                        new CheapLiteral()) {
                    @Override
                    public Type getBaseType() {
                        getBaseTypeOfInitializerTropicalFruitParameterUsed = true;
                        return TropicalFruit.class;
View Full Code Here

            } else if (method.getJavaMember().getName().equals("observer2")) {
                AnnotatedMethodWrapper<? super Grocery> methodWrapper = new AnnotatedMethodWrapper(method, this, true);
                methods.add(wrapMethodParameters(method.getParameters(), methodWrapper, true, new ExpensiveLiteral()));
            } else if (method.getJavaMember().getName().equals("observerMilk")) {
                AnnotatedMethodWrapper<? super Grocery> methodWrapper = new AnnotatedMethodWrapper(method, this, true);
                methodWrapper.replaceParameters(new AnnotatedParameterWrapper(methodWrapper.getParameter(0), methodWrapper, true),
                        new AnnotatedParameterWrapper(methodWrapper.getParameter(1), methodWrapper, true) {
                            @Override
                            public Type getBaseType() {
                                getBaseTypeOfObserverInjectionPointUsed = true;
                                return TropicalFruit.class;
View Full Code Here

                        });
                methods.add(methodWrapper);
            } else if (method.getJavaMember().getName().equals("destroyBill")) {
                AnnotatedMethodWrapper<? super Grocery> methodWrapper = new AnnotatedMethodWrapper(method, this, true);
                // replace the second parameter and keep the first one
                methodWrapper.replaceParameters(new AnnotatedParameterWrapper(methodWrapper.getParameter(0), methodWrapper, true),
                        new AnnotatedParameterWrapper(methodWrapper.getParameter(1), methodWrapper, true, AnyLiteral.INSTANCE) {
                            @Override
                            public Type getBaseType() {
                                getBaseTypeOfBillDisposerParameterUsed = true;
                                return TropicalFruit.class;
View Full Code Here

                        });
                methods.add(methodWrapper);

            } else if (method.getJavaMember().getName().equals("observesVegetable")) {
                AnnotatedMethodWrapper<? super Grocery> methodWrapper = new AnnotatedMethodWrapper(method, this, true);
                methodWrapper.replaceParameters(new AnnotatedParameterWrapper(methodWrapper.getParameter(0), methodWrapper, true) {
                    @Override
                    public Type getBaseType() {
                        getBaseTypeOfObserverParameterUsed = true;
                        return Carrot.class;
                    }
View Full Code Here

                });
                methods.add(methodWrapper);

            } else if (method.getJavaMember().getName().equals("destroyVegetable")) {
                AnnotatedMethodWrapper<? super Grocery> methodWrapper = new AnnotatedMethodWrapper(method, this, true);
                methodWrapper.replaceParameters(new AnnotatedParameterWrapper(methodWrapper.getParameter(0), methodWrapper, true, new CheapLiteral()) {
                    @Override
                    public Type getBaseType() {
                        return Carrot.class;
                    }
                });
View Full Code Here

                });
                methods.add(methodWrapper);

            } else if (method.getJavaMember().getName().equals("destroyYogurt")) {
                AnnotatedMethodWrapper<? super Grocery> methodWrapper = new AnnotatedMethodWrapper(method, this, true);
                methodWrapper.replaceParameters(
                        new AnnotatedParameterWrapper(methodWrapper.getParameter(0), methodWrapper, false,
                                new Annotation[] { new ExpensiveLiteral(), new Disposes() {
                                    public Class<? extends Annotation> annotationType() {
                                        return Disposes.class;
                                    }
View Full Code Here

            } else if (method.getJavaMember().getName().equals("nonInjectAnnotatedInitializer")) {
                methods.add(wrapMethod(method, false, new InjectLiteral()));
            } else if (method.getJavaMember().getName().equals("initializer")) {

                AnnotatedMethodWrapper<? super Grocery> methodWrapper = new AnnotatedMethodWrapper(method, true);
                methodWrapper.replaceParameters(new AnnotatedParameterWrapper(methodWrapper.getParameter(0), false,
                        new CheapLiteral()) {
                    @Override
                    public Type getBaseType() {
                        getBaseTypeOfInitializerTropicalFruitParameterUsed = true;
                        return TropicalFruit.class;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.