@Override public boolean isArray() { return this.binding.isArrayType(); }
@Override public boolean isArray() { return mBinding.isArrayType(); }
public boolean isArrayConstructorReference() { return isConstructorReference() && this.lhs.resolvedType != null && this.lhs.resolvedType.isArrayType(); } }
public boolean isArrayConstructorReference() { return isConstructorReference() && this.lhs.resolvedType != null && this.lhs.resolvedType.isArrayType(); } }
public boolean isArrayConstructorReference() { return isConstructorReference() && this.lhs.resolvedType != null && this.lhs.resolvedType.isArrayType(); } }
DefaultValuePairBinding(org.eclipse.jdt.internal.compiler.lookup.MethodBinding binding, BindingResolver resolver) { super(null, resolver); this.method = binding; this.value = MemberValuePairBinding.buildDOMValue(binding.getDefaultValue(), resolver); if (binding.returnType != null && binding.returnType.isArrayType()) { if (!this.value.getClass().isArray()) { // wrap into an array this.value = new Object[] { this.value }; } } }
DefaultValuePairBinding(org.eclipse.jdt.internal.compiler.lookup.MethodBinding binding, BindingResolver resolver) { super(null, resolver); this.method = binding; this.value = MemberValuePairBinding.buildDOMValue(binding.getDefaultValue(), resolver); if (binding.returnType != null && binding.returnType.isArrayType()) { // wrap into an array if (this.value == null) { this.value = new Object[0]; } else if (!this.value.getClass().isArray()) { this.value = new Object[] { this.value }; } } }
DefaultValuePairBinding(org.eclipse.jdt.internal.compiler.lookup.MethodBinding binding, BindingResolver resolver) { super(null, resolver); this.method = binding; this.value = MemberValuePairBinding.buildDOMValue(binding.getDefaultValue(), resolver); if (binding.returnType != null && binding.returnType.isArrayType()) { // wrap into an array if (this.value == null) { this.value = new Object[0]; } else if (!this.value.getClass().isArray()) { this.value = new Object[] { this.value }; } } }
DefaultValuePairBinding(org.eclipse.jdt.internal.compiler.lookup.MethodBinding binding, BindingResolver resolver) { super(null, resolver); this.method = binding; this.value = MemberValuePairBinding.buildDOMValue(binding.getDefaultValue(), resolver); if (binding.returnType != null && binding.returnType.isArrayType()) { // wrap into an array if (this.value == null) { this.value = new Object[0]; } else if (!this.value.getClass().isArray()) { this.value = new Object[] { this.value }; } } }
DefaultValuePairBinding(org.eclipse.jdt.internal.compiler.lookup.MethodBinding binding, BindingResolver resolver) { super(null, resolver); this.method = binding; this.value = MemberValuePairBinding.buildDOMValue(binding.getDefaultValue(), resolver); if (binding.returnType != null && binding.returnType.isArrayType()) { // wrap into an array if (this.value == null) { this.value = new Object[0]; } else if (!this.value.getClass().isArray()) { this.value = new Object[] { this.value }; } } }
private boolean shouldTryVarargs(MethodBinding method, TypeBinding resolvedType, TypeBinding targetType) { if (!method.isVarargs()) return false; if (targetType == null) return true; // off range if (targetType.isArrayType() && resolvedType != null && !resolvedType.isCompatibleWith(targetType, this)) return true; // not a direct match but hope to improve return false; }
private boolean shouldTryVarargs(MethodBinding method, TypeBinding resolvedType, TypeBinding targetType) { if (!method.isVarargs()) return false; if (targetType == null) return true; // off range if (targetType.isArrayType() && resolvedType != null && !resolvedType.isCompatibleWith(targetType, this)) return true; // not a direct match but hope to improve return false; }
private boolean shouldTryVarargs(MethodBinding method, TypeBinding resolvedType, TypeBinding targetType) { if (!method.isVarargs()) return false; if (targetType == null) return true; // off range if (targetType.isArrayType() && resolvedType != null && !resolvedType.isCompatibleWith(targetType, this)) return true; // not a direct match but hope to improve return false; }
MethodBinding getCompileTimeDeclaration(Scope scope, boolean isConstructorRef, TypeBinding[] parameters) { if (this.exactMethodBinding != null) return this.exactMethodBinding; else if (this.receiverType.isArrayType()) return scope.findMethodForArray((ArrayBinding) this.receiverType, this.selector, Binding.NO_PARAMETERS, this); else if (isConstructorRef) return scope.getConstructor((ReferenceBinding) this.receiverType, parameters, this); else return scope.getMethod(this.receiverType, this.selector, parameters, this); }
MethodBinding getCompileTimeDeclaration(Scope scope, boolean isConstructorRef, TypeBinding[] parameters) { if (this.exactMethodBinding != null) return this.exactMethodBinding; else if (this.receiverType.isArrayType()) return scope.findMethodForArray((ArrayBinding) this.receiverType, this.selector, Binding.NO_PARAMETERS, this); else if (isConstructorRef) return scope.getConstructor((ReferenceBinding) this.receiverType, parameters, this); else return scope.getMethod(this.receiverType, this.selector, parameters, this); }
MethodBinding getCompileTimeDeclaration(Scope scope, boolean isConstructorRef, TypeBinding[] parameters) { if (this.exactMethodBinding != null) return this.exactMethodBinding; else if (this.receiverType.isArrayType()) return scope.findMethodForArray((ArrayBinding) this.receiverType, this.selector, Binding.NO_PARAMETERS, this); else if (isConstructorRef) return scope.getConstructor((ReferenceBinding) this.receiverType, parameters, this); else return scope.getMethod(this.receiverType, this.selector, parameters, this); }
MethodBinding getCompileTimeDeclaration(Scope scope, boolean isConstructorRef, TypeBinding[] parameters) { if (this.exactMethodBinding != null) return this.exactMethodBinding; else if (this.receiverType.isArrayType()) return scope.findMethodForArray((ArrayBinding) this.receiverType, this.selector, Binding.NO_PARAMETERS, this); else if (isConstructorRef) return scope.getConstructor((ReferenceBinding) this.receiverType, parameters, this); else return scope.getMethod(this.receiverType, this.selector, parameters, this); }
MethodBinding getCompileTimeDeclaration(Scope scope, boolean isConstructorRef, TypeBinding[] parameters) { if (this.exactMethodBinding != null) return this.exactMethodBinding; else if (this.receiverType.isArrayType()) return scope.findMethodForArray((ArrayBinding) this.receiverType, this.selector, Binding.NO_PARAMETERS, this); else if (isConstructorRef) return scope.getConstructor((ReferenceBinding) this.receiverType, parameters, this); else return scope.getMethod(this.receiverType, this.selector, parameters, this); }
private static TypeBinding getRealErasure(TypeBinding type, LookupEnvironment environment) { TypeBinding erasure = type.erasure(); // could still be / contain a generic type that needs to be converted to raw: TypeBinding erasedLeaf = erasure.leafComponentType(); if (erasedLeaf.isGenericType()) erasedLeaf = environment.convertToRawType(erasedLeaf, false); if (erasure.isArrayType()) return environment.createArrayType(erasedLeaf, erasure.dimensions()); return erasedLeaf; }
private static TypeBinding getRealErasure(TypeBinding type, LookupEnvironment environment) { TypeBinding erasure = type.erasure(); // could still be / contain a generic type that needs to be converted to raw: TypeBinding erasedLeaf = erasure.leafComponentType(); if (erasedLeaf.isGenericType()) erasedLeaf = environment.convertToRawType(erasedLeaf, false); if (erasure.isArrayType()) return environment.createArrayType(erasedLeaf, erasure.dimensions()); return erasedLeaf; }