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

com.artemis.generator.common.IterativeModelStrategy Maven / Gradle / Ivy

The newest version!
package com.artemis.generator.common;

import com.artemis.generator.model.artemis.ArtemisModel;
import com.artemis.generator.model.type.TypeModel;
import com.artemis.generator.model.artemis.ComponentDescriptor;

/**
 * Implement for strategies that iterates over model.
 *
 * @author Daan van Yperen
 */
public abstract class IterativeModelStrategy implements BuilderModelStrategy {

    @Override
    public void apply(ArtemisModel artemisModel, TypeModel model) {
        for (ComponentDescriptor component : artemisModel.components) {
            apply(component, model);
        }
    }

    /** Implementations should transform model based on component. */
    protected abstract void apply(ComponentDescriptor component, TypeModel model);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy