Package com.helger.jcodemodel

Examples of com.helger.jcodemodel.JInvocation.narrow()


            JMethod visitorMethod1 = visitor.method(interfaceMethod1.mods().getValue() & ~JMod.ABSTRACT, usedValueClassType, interfaceMethod1.name());
            visitorMethod1.annotate(Override.class);
            visitorMethod1.annotate(Nonnull.class);
            JInvocation invocation = valueClass.staticInvoke(interfaceMethod1.name());
            for (JTypeVar typeArgument: valueClass.typeParams())
                invocation.narrow(typeArgument);
            for (JVar param: interfaceMethod1.params()) {
                AbstractJType argumentType = visitorInterface.substituteSpecialType(param.type(), usedValueClassType, configuration.type().boxify(), types._RuntimeException);
                JVar argument = visitorMethod1.param(param.mods().getValue(), argumentType, nameSource.get(param.name()));
                if (configuration.isFieldValue(interfaceMethod1, param.name())) {
                    invocation.arg(newValue);
View Full Code Here


            factoryMethod.annotate(Override.class);

            JMethod constructorMethod = constructorMethods.get(interfaceMethod.name());
            JInvocation staticInvoke = valueClass.staticInvoke(constructorMethod);
            for (JTypeVar typeArgument: factoryClass.typeParams())
                staticInvoke.narrow(typeArgument);
            for (JVar param: interfaceMethod.params()) {
                AbstractJType argumentType = visitorInterface.substituteSpecialType(param.type(), usedValueClassType, usedValueClassType, types._RuntimeException);
                JVar argument = factoryMethod.param(param.mods().getValue(), argumentType, param.name());
                staticInvoke.arg(argument);
            }
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.