use of org.eclipse.xtend.lib.macro.declaration.TypeReference in project xtext-xtend by eclipse.
the class TypeParameterDeclarationImpl method isAssignableFrom.
@Override
public boolean isAssignableFrom(final Type otherType) {
if ((otherType == null)) {
return false;
}
final TypeReference thisTypeRef = this.getCompilationUnit().getTypeReferenceProvider().newTypeReference(this);
final TypeReference thatTypeRef = this.getCompilationUnit().getTypeReferenceProvider().newTypeReference(otherType);
return thisTypeRef.isAssignableFrom(thatTypeRef);
}
use of org.eclipse.xtend.lib.macro.declaration.TypeReference in project xtext-xtend by eclipse.
the class TypeReferenceProviderImpl method newSelfTypeReference.
@Override
public TypeReference newSelfTypeReference(final Type typeDeclaration) {
TypeReference _xifexpression = null;
if ((typeDeclaration instanceof TypeParameterDeclarator)) {
final Function1<TypeParameterDeclaration, TypeReference> _function = (TypeParameterDeclaration it) -> {
return this.newTypeReference(it);
};
_xifexpression = this.newTypeReference(typeDeclaration, ((TypeReference[]) Conversions.unwrapArray(IterableExtensions.map(((TypeParameterDeclarator) typeDeclaration).getTypeParameters(), _function), TypeReference.class)));
} else {
_xifexpression = this.newTypeReference(typeDeclaration);
}
return _xifexpression;
}
use of org.eclipse.xtend.lib.macro.declaration.TypeReference in project xtext-xtend by eclipse.
the class VoidTypeImpl method isAssignableFrom.
@Override
public boolean isAssignableFrom(final Type otherType) {
if ((otherType == null)) {
return false;
}
final TypeReference thisTypeRef = this.getCompilationUnit().getTypeReferenceProvider().newTypeReference(this);
final TypeReference thatTypeRef = this.getCompilationUnit().getTypeReferenceProvider().newTypeReference(otherType);
return thisTypeRef.isAssignableFrom(thatTypeRef);
}
use of org.eclipse.xtend.lib.macro.declaration.TypeReference in project xtext-xtend by eclipse.
the class XtendTypeDeclarationImpl method isAssignableFrom.
@Override
public boolean isAssignableFrom(final Type otherType) {
if ((otherType == null)) {
return false;
}
final TypeReference thisTypeRef = this.getCompilationUnit().getTypeReferenceProvider().newTypeReference(this);
final TypeReference thatTypeRef = this.getCompilationUnit().getTypeReferenceProvider().newTypeReference(otherType);
return thisTypeRef.isAssignableFrom(thatTypeRef);
}
use of org.eclipse.xtend.lib.macro.declaration.TypeReference in project xtext-xtend by eclipse.
the class XtendTypeParameterDeclarationImpl method isAssignableFrom.
@Override
public boolean isAssignableFrom(final Type otherType) {
if ((otherType == null)) {
return false;
}
final TypeReference thisTypeRef = this.getCompilationUnit().getTypeReferenceProvider().newTypeReference(this);
final TypeReference thatTypeRef = this.getCompilationUnit().getTypeReferenceProvider().newTypeReference(otherType);
return thisTypeRef.isAssignableFrom(thatTypeRef);
}
Aggregations