All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.hilling.lang.metamodel.testing.Car__Metamodel Maven / Gradle / Ivy

The newest version!
package de.hilling.lang.metamodel.testing;

import de.hilling.lang.metamodel.Attribute;
import de.hilling.lang.metamodel.AttributeImplementation;
import de.hilling.lang.metamodel.MutableAttribute;
import de.hilling.lang.metamodel.MutableAttributeImplementation;
import java.lang.Integer;
import java.lang.Override;
import java.lang.String;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

public abstract class Car__Metamodel {
    private static final List ATTRIBUTES;

    public static final Attribute year;

    public static final Attribute> owners;

    public static final MutableAttribute model;

    static {
        year = new AttributeImplementation("year", Car.class, Integer.class) {
            @Override
            public Integer readAttribute(Car object) {
                return object.getYear();
            }
        };
        owners = new AttributeImplementation>("owners", Car.class, List.class) {
            @Override
            public List readAttribute(Car object) {
                return object.getOwners();
            }
        };
        model = new MutableAttributeImplementation("model", Car.class, String.class) {
            @Override
            public String readAttribute(Car object) {
                return object.getModel();
            }

            @Override
            public void writeAttribute(Car object, String value) {
                object.setModel(value);
            }
        };
        List attributesList = new LinkedList<>();
        attributesList.add(model);
        attributesList.add(year);
        attributesList.add(owners);
        ATTRIBUTES = Collections.unmodifiableList(attributesList);
    }

    public static List attributes() {
        return ATTRIBUTES;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy