private void ensureInterfaces() { if (_interfaces == null) { synchronized (CACHE_LOCK) { if (_interfaces == null) { _interfaces = GenericBinder.visit(_genericTypeDefinition.getExplicitInterfaces(), _typeBindings); } } } }
private void ensureFields() { if (_fields == null) { synchronized (CACHE_LOCK) { if (_fields == null) { _fields = GenericBinder.visit(this, _basedOn.getDeclaredFields(), _allBindings); } } } }
private void ensureConstructors() { if (_constructors == null) { synchronized (CACHE_LOCK) { if (_constructors == null) { _constructors = GenericBinder.visit(this, _genericTypeDefinition.getDeclaredConstructors(), _typeBindings); } } } }
private void ensureInterfaces() { if (_interfaces == null) { synchronized (CACHE_LOCK) { if (_interfaces == null) { _interfaces = GenericBinder.visit(_basedOn.getExplicitInterfaces(), _allBindings); } } } }
private void ensureMethods() { if (_methods == null) { synchronized (CACHE_LOCK) { if (_methods == null) { _methods = GenericBinder.visit(this, _basedOn.getDeclaredMethods(), _allBindings); } } } }
private void ensureMethods() { if (_methods == null) { synchronized (CACHE_LOCK) { if (_methods == null) { _methods = GenericBinder.visit(this, _genericTypeDefinition.getDeclaredMethods(), _typeBindings); } } } }
private void ensureFields() { if (_fields == null) { synchronized (CACHE_LOCK) { if (_fields == null) { _fields = GenericBinder.visit(this, _genericTypeDefinition.getDeclaredFields(), _typeBindings); } } } }
private void ensureFields() { if (_fields == null) { synchronized (CACHE_LOCK) { if (_fields == null) { _fields = GenericBinder.visit(this, _basedOn.getDeclaredFields(), _allBindings); } } } }
private void ensureConstructors() { if (_constructors == null) { synchronized (CACHE_LOCK) { if (_constructors == null) { _constructors = GenericBinder.visit(this, _basedOn.getDeclaredConstructors(), _allBindings); } } } }
private void ensureInterfaces() { if (_interfaces == null) { synchronized (CACHE_LOCK) { if (_interfaces == null) { _interfaces = GenericBinder.visit(_genericTypeDefinition.getExplicitInterfaces(), _typeBindings); } } } }
private void ensureFields() { if (_fields == null) { synchronized (CACHE_LOCK) { if (_fields == null) { _fields = GenericBinder.visit(this, _genericTypeDefinition.getDeclaredFields(), _typeBindings); } } } }
private void ensureFields() { if (_fields == null) { synchronized (CACHE_LOCK) { if (_fields == null) { _fields = GenericBinder.visit(this, _genericTypeDefinition.getDeclaredFields(), _typeBindings); } } } }
public static Type substitute(final Type type, final TypeList genericParameters, final TypeList typeArguments) { return SubstitutingBinder.visit( type, TypeBindings.create(genericParameters, typeArguments) ); }
private void ensureMethods() { if (_methods == null) { synchronized (CACHE_LOCK) { if (_methods == null) { _methods = GenericBinder.visit(this, _basedOn.getDeclaredMethods(), _allBindings); } } } }
@Override public Type<?> visitWildcardType(final Type<?> type, final TypeBindings bindings) { final Type<?> oldLower = type.getSuperBound(); final Type<?> oldUpper = type.getExtendsBound(); final Type<?> newLower = visit(oldLower, bindings); final Type<?> newUpper = visit(oldUpper, bindings); if (newLower != oldLower || newUpper != oldUpper) { return new WildcardType<>(newUpper, newLower); } return type; }
@Override public Type<?> visitWildcardType(final Type<?> type, final TypeBindings bindings) { final Type<?> oldLower = type.getSuperBound(); final Type<?> oldUpper = type.getExtendsBound(); final Type<?> newLower = visit(oldLower, bindings); final Type<?> newUpper = visit(oldUpper, bindings); if (newLower != oldLower || newUpper != oldUpper) { return new WildcardType<>(newUpper, newLower); } return type; }
public static Type substitute(final Type type, final ImmutableList<Type<?>> genericParameters, final ImmutableList<Type<?>> typeArguments) { return SubstitutingBinder.visit( type, TypeBindings.create( Type.list(genericParameters), Type.list(typeArguments) ) ); }
@Override public Type<?> visitArrayType(final Type<?> type, final TypeBindings bindings) { final Type<?> oldElementType = type.getElementType(); final Type<?> newElementType = visit(oldElementType, bindings); if (TypeUtils.areEquivalent(oldElementType, newElementType)) { return type; } return newElementType.makeArrayType(); } }
public static Type substitute(final Type type, final ImmutableList<Type<?>> genericParameters, final ImmutableList<Type<?>> typeArguments) { return SubstitutingBinder.visit( type, TypeBindings.create( Type.list(genericParameters), Type.list(typeArguments) ) ); }
@Override public Type<?> visitArrayType(final Type<?> type, final TypeBindings bindings) { final Type<?> oldElementType = type.getElementType(); final Type<?> newElementType = visit(oldElementType, bindings); if (TypeUtils.areEquivalent(oldElementType, newElementType)) { return type; } return newElementType.makeArrayType(); }