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

com.dooapp.gaedo.blueprints.transformers.AbstractSimpleLiteralTransformer Maven / Gradle / Ivy

package com.dooapp.gaedo.blueprints.transformers;

public abstract class AbstractSimpleLiteralTransformer extends AbstractLiteralTransformer{
	protected final Class type;
	private final String typeName;

	public AbstractSimpleLiteralTransformer(Class type) {
		super();
		this.type = type;
		this.typeName = type.getName();
	}


	public boolean canHandle(ClassLoader classLoader, String effectiveType) {
		return typeName.equals(effectiveType);
	}

	public boolean areEquals(Object expected, String effectiveGraphValue) {
		if(type.isAssignableFrom(expected.getClass()))
			return toString(type.cast(expected)).equals(effectiveGraphValue);
		return false;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy