Java Code Examples for org.eclipse.xtext.common.types.TypesFactory#createJvmParameterizedTypeReference()

The following examples show how to use org.eclipse.xtext.common.types.TypesFactory#createJvmParameterizedTypeReference() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XFunctionTypeRefImplCustom.java    From xtext-extras with Eclipse Public License 2.0 6 votes vote down vote up
protected JvmTypeReference getJavaLangObjectTypeRef(JvmType rawType, TypesFactory typesFactory) {
	ResourceSet rs = EcoreUtil2.getResourceSet(rawType);
	JvmParameterizedTypeReference refToObject = typesFactory.createJvmParameterizedTypeReference();
	if (rs != null) {
		EObject javaLangObject = rs.getEObject(javaLangObjectURI, true);
		if (javaLangObject instanceof JvmType) {
			JvmType objectDeclaration = (JvmType) javaLangObject;
			refToObject.setType(objectDeclaration);
			return refToObject;
		}
	}
	JvmGenericType proxy = typesFactory.createJvmGenericType();
	((InternalEObject)proxy).eSetProxyURI(javaLangObjectURI);
	refToObject.setType(proxy);
	return refToObject;
}
 
Example 2
Source File: JvmTypeReferences.java    From xtext-extras with Eclipse Public License 2.0 5 votes vote down vote up
public JvmParameterizedTypeReferenceConstructor(JvmType jvmType, TypesFactory typesFactory, IJvmTypeProvider typesProvider, JvmParameterizedTypeReferenceConstructor parent) {
	this.reference = typesFactory.createJvmParameterizedTypeReference();
	reference.setType(jvmType);
	this.typesFactory = typesFactory;
	this.typesProvider = typesProvider;
	this.parent  = parent;
}
 
Example 3
Source File: JvmTypeReferences.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
public JvmParameterizedTypeReferenceConstructor(JvmType jvmType, TypesFactory typesFactory, IJvmTypeProvider typesProvider, JvmParameterizedTypeReferenceConstructor parent) {
	this.reference = typesFactory.createJvmParameterizedTypeReference();
	reference.setType(jvmType);
	this.typesFactory = typesFactory;
	this.typesProvider = typesProvider;
	this.parent  = parent;
}