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

jedi.annotation.writer.method.AbstractBasicFactoryMethodWriter Maven / Gradle / Ivy

package jedi.annotation.writer.method;

import static jedi.functional.Coercions.list;
import static jedi.functional.FunctionalPrimitives.append;

import java.util.Collection;
import java.util.List;

import jedi.annotation.processor.ProcessorOptions;
import jedi.annotation.processor.model.Annotateable;
import jedi.annotation.processor.model.Attribute;

public abstract class AbstractBasicFactoryMethodWriter extends AbstractFactoryMethodWriter {
	public AbstractBasicFactoryMethodWriter(ProcessorOptions options) {
		super(options);
	}

	@SuppressWarnings("unchecked")
	@Override
	protected final List getExecuteMethodParameters(Annotateable method) {
		return append(list(new Attribute(method.getDeclaringTypeWithUnboundedGenerics(), RECEIVER_PARAMETER_NAME)),
				method.getCutParameters());
	}

	@Override
	protected final Collection getFactoryMethodBasicParameters() {
		return getMethod().getUncutParameters();
	}

	@Override
	protected List getFactoryMethodAdditionalFormalParameters() {
		return list();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy