/** * @see org.eclipse.jdt.core.dom.IMethodBinding#isGenericMethod() * @since 3.1 */ public boolean isGenericMethod() { // equivalent to return getTypeParameters().length > 0; if (this.typeParameters != null) { return this.typeParameters.length > 0; } TypeVariableBinding[] typeVariableBindings = this.binding.typeVariables(); return (typeVariableBindings != null && typeVariableBindings.length > 0); }
/** * @see org.eclipse.jdt.core.dom.IMethodBinding#isGenericMethod() * @since 3.1 */ public boolean isGenericMethod() { // equivalent to return getTypeParameters().length > 0; if (this.typeParameters != null) { return this.typeParameters.length > 0; } TypeVariableBinding[] typeVariableBindings = this.binding.typeVariables(); return (typeVariableBindings != null && typeVariableBindings.length > 0); }
/** * @see org.eclipse.jdt.core.dom.IMethodBinding#isGenericMethod() * @since 3.1 */ public boolean isGenericMethod() { // equivalent to return getTypeParameters().length > 0; if (this.typeParameters != null) { return this.typeParameters.length > 0; } TypeVariableBinding[] typeVariableBindings = this.binding.typeVariables(); return (typeVariableBindings != null && typeVariableBindings.length > 0); }
/** * @see org.eclipse.jdt.core.dom.IMethodBinding#isGenericMethod() * @since 3.1 */ public boolean isGenericMethod() { // equivalent to return getTypeParameters().length > 0; if (this.typeParameters != null) { return this.typeParameters.length > 0; } TypeVariableBinding[] typeVariableBindings = this.binding.typeVariables(); return (typeVariableBindings != null && typeVariableBindings.length > 0); }
/** * @see org.eclipse.jdt.core.dom.IMethodBinding#isGenericMethod() * @since 3.1 */ public boolean isGenericMethod() { // equivalent to return getTypeParameters().length > 0; if (this.typeParameters != null) { return this.typeParameters.length > 0; } TypeVariableBinding[] typeVariableBindings = this.binding.typeVariables(); return (typeVariableBindings != null && typeVariableBindings.length > 0); }
/** * @see org.eclipse.jdt.core.dom.IMethodBinding#isGenericMethod() * @since 3.1 */ @Override public boolean isGenericMethod() { // equivalent to return getTypeParameters().length > 0; if (this.typeParameters != null) { return this.typeParameters.length > 0; } TypeVariableBinding[] typeVariableBindings = this.binding.typeVariables(); return (typeVariableBindings != null && typeVariableBindings.length > 0); }
@Override public List<? extends TypeVariable> getTypeVariables() { ArrayList<TypeVariable> list = new ArrayList<>(); TypeVariableBinding[] typeVariables = ((MethodBinding) this._binding).typeVariables(); if (typeVariables.length != 0) { for (TypeVariableBinding typeVariableBinding : typeVariables) { list.add((TypeVariable) _env.getFactory().newTypeMirror(typeVariableBinding)); } } return Collections.unmodifiableList(list); }
@Override public List<? extends TypeParameterElement> getTypeParameters() { MethodBinding binding = (MethodBinding)_binding; TypeVariableBinding[] variables = binding.typeVariables(); if (variables.length == 0) { return Collections.emptyList(); } List<TypeParameterElement> params = new ArrayList<TypeParameterElement>(variables.length); for (TypeVariableBinding variable : variables) { params.add(_env.getFactory().newTypeParameterElement(variable, this)); } return Collections.unmodifiableList(params); }
@Override public List<? extends TypeVariable> getTypeVariables() { ArrayList<TypeVariable> list = new ArrayList<TypeVariable>(); TypeVariableBinding[] typeVariables = ((MethodBinding) this._binding).typeVariables(); if (typeVariables.length != 0) { for (TypeVariableBinding typeVariableBinding : typeVariables) { list.add((TypeVariable) _env.getFactory().newTypeMirror(typeVariableBinding)); } } return Collections.unmodifiableList(list); }
@Override public List<? extends TypeVariable> getTypeVariables() { ArrayList<TypeVariable> list = new ArrayList<TypeVariable>(); TypeVariableBinding[] typeVariables = ((MethodBinding) this._binding).typeVariables(); if (typeVariables.length != 0) { for (TypeVariableBinding typeVariableBinding : typeVariables) { list.add((TypeVariable) _env.getFactory().newTypeMirror(typeVariableBinding)); } } return Collections.unmodifiableList(list); }
@Override public List<? extends TypeVariable> getTypeVariables() { ArrayList<TypeVariable> list = new ArrayList<>(); TypeVariableBinding[] typeVariables = ((MethodBinding) this._binding).typeVariables(); if (typeVariables.length != 0) { for (TypeVariableBinding typeVariableBinding : typeVariables) { list.add((TypeVariable) _env.getFactory().newTypeMirror(typeVariableBinding)); } } return Collections.unmodifiableList(list); }
@Override public List<? extends TypeParameterElement> getTypeParameters() { MethodBinding binding = (MethodBinding)_binding; TypeVariableBinding[] variables = binding.typeVariables(); if (variables.length == 0) { return Collections.emptyList(); } List<TypeParameterElement> params = new ArrayList<>(variables.length); for (TypeVariableBinding variable : variables) { params.add(_env.getFactory().newTypeParameterElement(variable, this)); } return Collections.unmodifiableList(params); }
@Override public List<? extends TypeParameterElement> getTypeParameters() { MethodBinding binding = (MethodBinding)_binding; TypeVariableBinding[] variables = binding.typeVariables(); if (variables.length == 0) { return Collections.emptyList(); } List<TypeParameterElement> params = new ArrayList<>(variables.length); for (TypeVariableBinding variable : variables) { params.add(_env.getFactory().newTypeParameterElement(variable, this)); } return Collections.unmodifiableList(params); }
@Override public List<? extends TypeParameterElement> getTypeParameters() { MethodBinding binding = (MethodBinding)_binding; TypeVariableBinding[] variables = binding.typeVariables(); if (variables.length == 0) { return Collections.emptyList(); } List<TypeParameterElement> params = new ArrayList<>(variables.length); for (TypeVariableBinding variable : variables) { params.add(_env.getFactory().newTypeParameterElement(variable, this)); } return Collections.unmodifiableList(params); }
@Override public List<? extends TypeVariable> getTypeVariables() { ArrayList<TypeVariable> list = new ArrayList<>(); TypeVariableBinding[] typeVariables = ((MethodBinding) this._binding).typeVariables(); if (typeVariables.length != 0) { for (TypeVariableBinding typeVariableBinding : typeVariables) { list.add((TypeVariable) _env.getFactory().newTypeMirror(typeVariableBinding)); } } return Collections.unmodifiableList(list); }
@Override public List<? extends TypeVariable> getTypeVariables() { ArrayList<TypeVariable> list = new ArrayList<TypeVariable>(); TypeVariableBinding[] typeVariables = ((MethodBinding) this._binding).typeVariables(); if (typeVariables.length != 0) { for (TypeVariableBinding typeVariableBinding : typeVariables) { list.add((TypeVariable) _env.getFactory().newTypeMirror(typeVariableBinding)); } } return Collections.unmodifiableList(list); }
@Override public List<? extends TypeParameterElement> getTypeParameters() { MethodBinding binding = (MethodBinding)_binding; TypeVariableBinding[] variables = binding.typeVariables(); if (variables.length == 0) { return Collections.emptyList(); } List<TypeParameterElement> params = new ArrayList<TypeParameterElement>(variables.length); for (TypeVariableBinding variable : variables) { params.add(_env.getFactory().newTypeParameterElement(variable, this)); } return Collections.unmodifiableList(params); }
@Override public List<? extends TypeParameterElement> getTypeParameters() { MethodBinding binding = (MethodBinding)_binding; TypeVariableBinding[] variables = binding.typeVariables(); if (variables.length == 0) { return Collections.emptyList(); } List<TypeParameterElement> params = new ArrayList<TypeParameterElement>(variables.length); for (TypeVariableBinding variable : variables) { params.add(_env.getFactory().newTypeParameterElement(variable, this)); } return Collections.unmodifiableList(params); }
protected TypeVariableBinding[] getTypeVariables() { //ask this or the actualType since we do not distinguish between the virtual parameterized type with arguments and the effective parameterized type with parameters MethodBinding refMethod = m_binding.original() != null ? m_binding.original() : m_binding; return refMethod.typeVariables(); }
public void consumeParameterizedGenericMethod() { if (this.methodBinding == null) return; TypeBinding[] arguments = getTypeBindingArguments(); if (arguments == null) { this.methodBinding = null; this.compilerBinding = null; return; } if (arguments.length != this.methodBinding.typeVariables().length) this.methodBinding = this.environment.createParameterizedGenericMethod(this.methodBinding, (RawTypeBinding) null); else this.methodBinding = this.environment.createParameterizedGenericMethod(this.methodBinding, arguments); this.compilerBinding = this.methodBinding; }