Package com.pogofish.jadt.ast

Examples of com.pogofish.jadt.ast.Constructor


    /**
     * hashCode with no args
     */
    @Test
    public void testNoArgHashCode() {
        final Constructor constructor = new Constructor(NO_COMMENTS, "Whatever", Util.<Arg>list());
       
        final StringSink sink = new StringSink("test");
        try {
           
            emitter.emitHashCode(sink, "    ", constructor);
View Full Code Here


    /**
     * hashCode with args
     */
    @Test
    public void testArgHashCode() {
        final Constructor constructor = new Constructor(NO_COMMENTS, "Foo", list(
                new Arg(Util.<ArgModifier>list(), _Primitive(_BooleanType()), "boolShit"),
                new Arg(Util.<ArgModifier>list(), _Primitive(_ByteType()), "dracula"),
                new Arg(Util.<ArgModifier>list(), _Primitive(_CharType()), "whatACharacter"),
                new Arg(Util.<ArgModifier>list(), _Primitive(_ShortType()), "shorty"),
                new Arg(Util.<ArgModifier>list(), _Primitive(_IntType()), "integrity"),
View Full Code Here

        }
    }

    private void emitSingleConstructor(Sink sink, DataType dataType, String header) {
      logger.finer("Generating single constructor for " + dataType.name + ".");
        final Constructor originalConstructor = dataType.constructors.get(0);
        final Constructor pseudoConstructor = new Constructor(originalConstructor.comments, dataType.name, originalConstructor.args);
       
        sink.write("public final class " + dataType.name);
        classBodyEmitter.emitParameterizedTypeName(sink, dataType.typeArguments);
        emitBaseClassAndInterfaces(sink, dataType);
        sink.write(" {\n\n");
View Full Code Here

TOP

Related Classes of com.pogofish.jadt.ast.Constructor

Copyright © 2018 www.massapicom. 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.