public final SignatureType getErasedSignature() { if (_erasedSignature == null) { synchronized (this) { if (_erasedSignature == null) { final Type<?> returnType = _returnType.getErasedType(); final TypeList parameterTypes = _parameterTypes.getErasedTypes(); if (returnType.isEquivalentTo(_returnType) && parameterTypes.isEquivalentTo(_parameterTypes)) { _erasedSignature = this; } else { _erasedSignature = new SignatureType(returnType, parameterTypes); } } } } return _erasedSignature; }
public final SignatureType getErasedSignature() { if (_erasedSignature == null) { synchronized (this) { if (_erasedSignature == null) { final Type<?> returnType = _returnType.getErasedType(); final TypeList parameterTypes = _parameterTypes.getErasedTypes(); if (returnType.isEquivalentTo(_returnType) && parameterTypes.isEquivalentTo(_parameterTypes)) { _erasedSignature = this; } else { _erasedSignature = new SignatureType(returnType, parameterTypes); } } } } return _erasedSignature; }
public final SignatureType getErasedSignature() { if (_erasedSignature == null) { synchronized (this) { if (_erasedSignature == null) { final Type<?> returnType = _returnType.getErasedType(); final TypeList parameterTypes = _parameterTypes.getErasedTypes(); if (returnType.isEquivalentTo(_returnType) && parameterTypes.isEquivalentTo(_parameterTypes)) { _erasedSignature = this; } else { _erasedSignature = new SignatureType(returnType, parameterTypes); } } } } return _erasedSignature; }
@Override public boolean isEquivalentTo(final MemberInfo m) { return m instanceof MethodBase && super.isEquivalentTo(m) && ((MethodBase) m).getParameters().getParameterTypes().isEquivalentTo(getParameters().getParameterTypes()); } }
@Override public boolean isEquivalentTo(final Type other) { if (other == this) { return true; } if (other == null) { return false; } if (other == _definition) { return _typeBindings.getBoundTypes().isEquivalentTo(_definition.getGenericTypeParameters()); } if (other instanceof TypeBuilderInstantiation) { final TypeBuilderInstantiation tbi = (TypeBuilderInstantiation) other; return tbi._definition == _definition && _typeBindings.getBoundTypes().isEquivalentTo(tbi._typeBindings.getBoundTypes()); } return _definition.isCreated() && _definition.createType().makeGenericType(_typeBindings.getBoundTypes()).isEquivalentTo(other); } }
public void setSignature(final Type<?> returnType, final TypeList parameterTypes) { verifyNotGeneric(); Type<?> newReturnType = _signatureType.getReturnType(); TypeList newParameterTypes = _signatureType.getParameterTypes(); if (returnType != null) { newReturnType = returnType; } if (parameterTypes != null) { newParameterTypes = parameterTypes; parameterBuilders = new ParameterBuilder[parameterTypes.size()]; for (int i = 0, n = parameterTypes.size(); i < n; i++) { parameterBuilders[i] = new ParameterBuilder( this, i, null, parameterTypes.get(i) ); } } if (!newReturnType.isEquivalentTo(_signatureType.getReturnType()) || !newParameterTypes.isEquivalentTo(_signatureType.getParameterTypes())) { _signatureType = new SignatureType(newReturnType, newParameterTypes); } }
public void setSignature(final Type<?> returnType, final TypeList parameterTypes) { verifyNotGeneric(); Type<?> newReturnType = _signatureType.getReturnType(); TypeList newParameterTypes = _signatureType.getParameterTypes(); if (returnType != null) { newReturnType = returnType; } if (parameterTypes != null) { newParameterTypes = parameterTypes; parameterBuilders = new ParameterBuilder[parameterTypes.size()]; for (int i = 0, n = parameterTypes.size(); i < n; i++) { parameterBuilders[i] = new ParameterBuilder( this, i, null, parameterTypes.get(i) ); } } if (!newReturnType.isEquivalentTo(_signatureType.getReturnType()) || !newParameterTypes.isEquivalentTo(_signatureType.getParameterTypes())) { _signatureType = new SignatureType(newReturnType, newParameterTypes); } }
public void setSignature(final Type<?> returnType, final TypeList parameterTypes) { verifyNotGeneric(); Type<?> newReturnType = _signatureType.getReturnType(); TypeList newParameterTypes = _signatureType.getParameterTypes(); if (returnType != null) { newReturnType = returnType; } if (parameterTypes != null) { newParameterTypes = parameterTypes; parameterBuilders = new ParameterBuilder[parameterTypes.size()]; for (int i = 0, n = parameterTypes.size(); i < n; i++) { parameterBuilders[i] = new ParameterBuilder( this, i, null, parameterTypes.get(i) ); } } if (!newReturnType.isEquivalentTo(_signatureType.getReturnType()) || !newParameterTypes.isEquivalentTo(_signatureType.getParameterTypes())) { _signatureType = new SignatureType(newReturnType, newParameterTypes); } invalidateCaches(); }
if (isGenericType()) { return other.isGenericType() && other.getTypeArguments().isEquivalentTo(getTypeArguments());