Examples of TypeBodyDeclaration


Examples of com.asakusafw.utils.java.model.syntax.TypeBodyDeclaration

     */
    protected List<TypeBodyDeclaration> createMembers(T model) {
        List<ModelProperty> properties = model.getProperties();
        List<TypeBodyDeclaration> body = new ArrayList<TypeBodyDeclaration>();
        for (ModelProperty property : properties) {
            TypeBodyDeclaration member = createField(property);
            body.add(member);
        }
        for (ModelProperty property : properties) {
            TypeBodyDeclaration getter = createGetter(property);
            body.add(getter);
            TypeBodyDeclaration setter = createSetter(property);
            body.add(setter);
            TypeBodyDeclaration altGetter = createAltGetter(property);
            if (altGetter != null) {
                body.add(altGetter);
            }
            TypeBodyDeclaration altSetter = createAltSetter(property);
            if (altSetter != null) {
                body.add(altSetter);
            }
            TypeBodyDeclaration optionGetter = createOptionGetter(property);
            body.add(optionGetter);
            TypeBodyDeclaration optionSetter = createOptionSetter(property);
            body.add(optionSetter);
        }
        body.add(createCopier(model));

        body.add(createWritableWrite(model));
View Full Code Here

Examples of org.codehaus.janino.Java.TypeBodyDeclaration

        // For classes that enclose surrounding scopes, trawl their initializers looking for synthetic fields.
        if (icd instanceof AnonymousClassDeclaration || icd instanceof LocalClassDeclaration) {
            Java.ClassDeclaration cd = (Java.ClassDeclaration) icd;
            for (int i = 0; i < cd.variableDeclaratorsAndInitializers.size(); ++i) {
                TypeBodyDeclaration tbd = (TypeBodyDeclaration) cd.variableDeclaratorsAndInitializers.get(i);
                if (tbd instanceof FieldDeclaration) {
                    FieldDeclaration fd = (FieldDeclaration) tbd;
                    for (int j = 0; j < fd.variableDeclarators.length; ++j) {
                        VariableDeclarator vd = fd.variableDeclarators[j];
                        if (vd.optionalInitializer != null) {
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.