jtl-eclipse-master/JTL.resource.jtl/src-gen/JTL/resource/jtl/mopp/JtlContextDependentURIFragmentFactory.java
/**
 * <copyright>
 * </copyright>
 *
 * 
 */
package JTL.resource.jtl.mopp;

/**
 * A factory for ContextDependentURIFragments. Given a feasible reference
 * resolver, this factory returns a matching fragment that used the resolver to
 * resolver proxy objects.
 * 
 * @param <ContainerType> the type of the class containing the reference to be
 * resolved
 * @param <ReferenceType> the type of the reference to be resolved
 */
public class JtlContextDependentURIFragmentFactory<ContainerType extends org.eclipse.emf.ecore.EObject, ReferenceType extends org.eclipse.emf.ecore.EObject>  implements JTL.resource.jtl.IJtlContextDependentURIFragmentFactory<ContainerType, ReferenceType> {
	
	private final JTL.resource.jtl.IJtlReferenceResolver<ContainerType, ReferenceType> resolver;
	
	public JtlContextDependentURIFragmentFactory(JTL.resource.jtl.IJtlReferenceResolver<ContainerType, ReferenceType> resolver) {
		this.resolver = resolver;
	}
	
	public JTL.resource.jtl.IJtlContextDependentURIFragment<?> create(String identifier, ContainerType container, org.eclipse.emf.ecore.EReference reference, int positionInReference, org.eclipse.emf.ecore.EObject proxy) {
		
		return new JTL.resource.jtl.mopp.JtlContextDependentURIFragment<ContainerType, ReferenceType>(identifier, container, reference, positionInReference, proxy) {
			public JTL.resource.jtl.IJtlReferenceResolver<ContainerType, ReferenceType> getResolver() {
				return resolver;
			}
		};
	}
}
