Search in sources :

Example 1 with ResolvedParameterImpl

use of org.eclipse.xtend.core.macro.declaration.ResolvedParameterImpl in project xtext-xtend by eclipse.

the class ResolvedExecutableImpl method getResolvedParameters.

@Override
public Iterable<? extends ResolvedParameter> getResolvedParameters() {
    Iterable<? extends ResolvedParameter> _xblockexpression = null;
    {
        if ((this.resolvedParameters == null)) {
            int _size = this.getDelegate().getDeclaration().getParameters().size();
            final Function1<Integer, ResolvedParameterImpl> _function = (Integer i) -> {
                ParameterDeclaration _parameterDeclaration = this.getCompilationUnit().toParameterDeclaration(this.getDelegate().getDeclaration().getParameters().get((i).intValue()));
                TypeReference _typeReference = this.getCompilationUnit().toTypeReference(this.getDelegate().getResolvedParameterTypes().get((i).intValue()));
                return new ResolvedParameterImpl(_parameterDeclaration, _typeReference);
            };
            this.resolvedParameters = IterableExtensions.<Integer, ResolvedParameterImpl>map(new ExclusiveRange(0, _size, true), _function);
        }
        _xblockexpression = this.resolvedParameters;
    }
    return _xblockexpression;
}
Also used : Function1(org.eclipse.xtext.xbase.lib.Functions.Function1) ResolvedParameterImpl(org.eclipse.xtend.core.macro.declaration.ResolvedParameterImpl) LightweightTypeReference(org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference) TypeReference(org.eclipse.xtend.lib.macro.declaration.TypeReference) ExclusiveRange(org.eclipse.xtext.xbase.lib.ExclusiveRange) ParameterDeclaration(org.eclipse.xtend.lib.macro.declaration.ParameterDeclaration)

Aggregations

ResolvedParameterImpl (org.eclipse.xtend.core.macro.declaration.ResolvedParameterImpl)1 ParameterDeclaration (org.eclipse.xtend.lib.macro.declaration.ParameterDeclaration)1 TypeReference (org.eclipse.xtend.lib.macro.declaration.TypeReference)1 ExclusiveRange (org.eclipse.xtext.xbase.lib.ExclusiveRange)1 Function1 (org.eclipse.xtext.xbase.lib.Functions.Function1)1 LightweightTypeReference (org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference)1