blob: 7918a403c9232cf6fc18efc4d2fee3ed5f9e2330 [file] [log] [blame]
package org.eclipse.jpt.core.tests.extension.resource;
import org.eclipse.jpt.core.JpaFactory;
import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
import org.eclipse.jpt.core.context.java.JavaAttributeMappingProvider;
import org.eclipse.jpt.core.internal.jdtutility.Attribute;
import org.eclipse.jpt.core.internal.jdtutility.DeclarationAnnotationAdapter;
public class TestAttributeMappingProvider
implements JavaAttributeMappingProvider
{
// singleton
private static final TestAttributeMappingProvider INSTANCE = new TestAttributeMappingProvider();
/**
* Return the singleton.
*/
public static JavaAttributeMappingProvider instance() {
return INSTANCE;
}
/**
* Ensure non-instantiability.
*/
private TestAttributeMappingProvider() {
super();
}
public String key() {
return "test";
}
public JavaAttributeMapping buildMapping(Attribute attribute, JpaFactory factory) {
return ((TestJpaFactory) factory).createTestAttributeMapping(attribute);
}
public DeclarationAnnotationAdapter declarationAnnotationAdapter() {
return null;
}
}