de.hilling.lang.metamodel.AttributeImplementation Maven / Gradle / Ivy
The newest version!
package de.hilling.lang.metamodel;
/**
* Stub implementation for {@link Attribute}.
*
* @param Declaring class of the attribute.
* @param Type of the attribute.
*/
public abstract class AttributeImplementation implements Attribute {
protected final String name;
private final Class declaringType;
private final Class javaType;
@SuppressWarnings({"unchecked", "rawtypes"})
protected AttributeImplementation(String name, Class declaringType, Class javaType) {
this.javaType = javaType;
this.name = name;
this.declaringType = declaringType;
}
@Override
public final String getName() {
return name;
}
@Override
public final Class getDeclaringType() {
return declaringType;
}
@Override
public final Class getJavaType() {
return javaType;
}
}