Examples of generify()


Examples of com.helger.jcodemodel.JDefinedClass.generify()

        }
        newClass.hide();
        Annotator classAnnotator = new Annotator(newClass, environment);
        classAnnotator.annotate(element.getAnnotationMirrors());
        for (TypeParameterElement parameter: element.getTypeParameters()) {
            JTypeVar typeVariable = newClass.generify(parameter.getSimpleName().toString());
            environment.put(typeVariable.name(), typeVariable);
            for (TypeMirror type: parameter.getBounds()) {
                typeVariable.bound((AbstractJClass)toJType(type, environment));
            }
        }
View Full Code Here

Examples of com.helger.jcodemodel.JMethod.generify()

                JMethod method = newClass.method(toJMod(executable.getModifiers()), codeModel.VOID, executable.getSimpleName().toString());
                TypeEnvironment methodEnvironment = environment.enclosed();
                Annotator methodAnnotator = new Annotator(method, environment);
                methodAnnotator.annotate(executable.getAnnotationMirrors());
                for (TypeParameterElement parameter: executable.getTypeParameters()) {
                    JTypeVar typeVariable = method.generify(parameter.getSimpleName().toString());
                    methodEnvironment.put(typeVariable.name(), typeVariable);
                    for (TypeMirror type: parameter.getBounds()) {
                        typeVariable.bound((AbstractJClass)toJType(type, methodEnvironment));
                    }
                }
View Full Code Here

Examples of com.sun.codemodel.JDefinedClass.generify()

    @Override
    protected void run(Set<ClassOutline> classes) {
       
        final JDefinedClass _interface = outline.getClassFactory().createInterface(jpackage, "Visitor", null);
       
        final JTypeVar returnType = _interface.generify("R");
        final JTypeVar exceptionType = _interface.generify("E", Throwable.class);

        setOutput( _interface );
       
        for(ClassOutline classOutline : classes) {
View Full Code Here

Examples of com.sun.codemodel.JDefinedClass.generify()

    protected void run(Set<ClassOutline> classes) {
       
        final JDefinedClass _interface = outline.getClassFactory().createInterface(jpackage, "Visitor", null);
       
        final JTypeVar returnType = _interface.generify("R");
        final JTypeVar exceptionType = _interface.generify("E", Throwable.class);

        setOutput( _interface );
       
        for(ClassOutline classOutline : classes) {
            if (!classOutline.target.isAbstract()) {
View Full Code Here

Examples of com.sun.codemodel.JDefinedClass.generify()

    protected void run(Set<ClassOutline> classes) {
        JDefinedClass scratch = getOutline().getClassFactory().createInterface(getPackage(), "_scratch", null);
        JDefinedClass _interface = getOutline().getClassFactory().createInterface(getPackage(), "Traverser", null);
    setOutput(_interface);
        final JTypeVar retType = scratch.generify("?");
        final JTypeVar exceptionType = _interface.generify("E", Throwable.class);
        final JClass narrowedVisitor = visitor.narrow(retType).narrow(exceptionType);
        for (ClassOutline classOutline : classes) {
            if (!classOutline.target.isAbstract()) {
                // add the bean to the traverser
                JMethod traverseMethod = getOutput().method(JMod.PUBLIC, void.class, "traverse");
View Full Code Here

Examples of com.sun.codemodel.JDefinedClass.generify()

   
    @Override
    protected void run(Set<ClassOutline> classes) {
        JDefinedClass _class = getOutline().getClassFactory().createClass(getPackage(), "BaseVisitor", null);
    setOutput(_class);
        final JTypeVar returnType = _class.generify("R");
        final JTypeVar exceptionType = _class.generify("E", Throwable.class);
    final JClass narrowedVisitor = visitor.narrow(returnType, exceptionType);
        getOutput()._implements(narrowedVisitor);
        for (ClassOutline classOutline : classes) {
            if (!classOutline.target.isAbstract()) {
View Full Code Here

Examples of com.sun.codemodel.JDefinedClass.generify()

    @Override
    protected void run(Set<ClassOutline> classes) {
        JDefinedClass _class = getOutline().getClassFactory().createClass(getPackage(), "BaseVisitor", null);
    setOutput(_class);
        final JTypeVar returnType = _class.generify("R");
        final JTypeVar exceptionType = _class.generify("E", Throwable.class);
    final JClass narrowedVisitor = visitor.narrow(returnType, exceptionType);
        getOutput()._implements(narrowedVisitor);
        for (ClassOutline classOutline : classes) {
            if (!classOutline.target.isAbstract()) {
                // add the method to the base vizzy
View Full Code Here

Examples of com.sun.codemodel.JMethod.generify()

    @Override
    protected void run(Set<ClassOutline> classes) {
        final JDefinedClass _interface = outline.getClassFactory().createInterface(jpackage, "Visitable", null);
    setOutput( _interface );
    final JMethod _method = getOutput().method(JMod.PUBLIC, void.class, "accept");
    final JTypeVar returnType = _method.generify("R");
    final JTypeVar exceptionType = _method.generify("E", Throwable.class);
    _method.type(returnType);
    _method._throws(exceptionType);
    final JClass narrowedVisitor = visitor.narrow(returnType, exceptionType);
    _method.param(narrowedVisitor, "aVisitor");
View Full Code Here

Examples of com.sun.codemodel.JMethod.generify()

    protected void run(Set<ClassOutline> classes) {
        final JDefinedClass _interface = outline.getClassFactory().createInterface(jpackage, "Visitable", null);
    setOutput( _interface );
    final JMethod _method = getOutput().method(JMod.PUBLIC, void.class, "accept");
    final JTypeVar returnType = _method.generify("R");
    final JTypeVar exceptionType = _method.generify("E", Throwable.class);
    _method.type(returnType);
    _method._throws(exceptionType);
    final JClass narrowedVisitor = visitor.narrow(returnType, exceptionType);
    _method.param(narrowedVisitor, "aVisitor");
       
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.