private static void adaptSelf( final Type t, final ListBuffer<Type<?>> from, final ListBuffer<Type<?>> to) { try { //if (t.getGenericTypeDefinition() != t) adapt(t.getGenericTypeDefinition(), t, from, to); } catch (AdaptFailure ex) { // Adapt should never fail calculating a mapping from // t.getGenericTypeDefinition() to t as there can be no merge problem. throw new AssertionError(ex); } }
private static void adaptSelf( final Type t, final ListBuffer<Type<?>> from, final ListBuffer<Type<?>> to) { try { //if (t.getGenericTypeDefinition() != t) adapt(t.getGenericTypeDefinition(), t, from, to); } catch (AdaptFailure ex) { // Adapt should never fail calculating a mapping from // t.getGenericTypeDefinition() to t as there can be no merge problem. throw new AssertionError(ex); } }
private static void adaptSelf( final Type t, final ListBuffer<Type<?>> from, final ListBuffer<Type<?>> to) { try { //if (t.getGenericTypeDefinition() != t) adapt(t.getGenericTypeDefinition(), t, from, to); } catch (AdaptFailure ex) { // Adapt should never fail calculating a mapping from // t.getGenericTypeDefinition() to t as there can be no merge problem. throw new AssertionError(ex); } }
@Override public Type getGenericTypeDefinition() { if (_elementType.isGenericTypeDefinition()) { return this; } return _elementType.getGenericTypeDefinition().makeArrayType(); }
@Override public Type getGenericTypeDefinition() { if (_elementType.isGenericTypeDefinition()) { return this; } return _elementType.getGenericTypeDefinition().makeArrayType(); }
@Override public Type getGenericTypeDefinition() { if (_elementType.isGenericTypeDefinition()) { return this; } return _elementType.getGenericTypeDefinition().makeArrayType(); }
private static Type<?> erase(final Type<?> t) { final Type<?> def = t.isGenericType() ? t.getGenericTypeDefinition() : t; return def.getErasedType(); }
private static Type<?> erase(final Type<?> t) { final Type<?> def = t.isGenericType() ? t.getGenericTypeDefinition() : t; return def.getErasedType(); }
ErasedType(final Type baseType) { VerifyArgument.notNull(baseType, "baseType"); _originalType = baseType.isGenericType() ? baseType.getGenericTypeDefinition() : baseType; }
private static Type<?> erase(final Type<?> t) { final Type<?> def = t.isGenericType() ? t.getGenericTypeDefinition() : t; return def.getErasedType(); }
private static Type<?> erase(final Type<?> t) { final Type<?> def = t.isGenericType() ? t.getGenericTypeDefinition() : t; return def.getErasedType(); }
ErasedType(final Type baseType) { VerifyArgument.notNull(baseType, "baseType"); _originalType = baseType.isGenericType() ? baseType.getGenericTypeDefinition() : baseType; }
ErasedType(final Type baseType) { VerifyArgument.notNull(baseType, "baseType"); _originalType = baseType.isGenericType() ? baseType.getGenericTypeDefinition() : baseType; }
private static Type<?> erase(final Type<?> t) { final Type<?> def = t.isGenericType() ? t.getGenericTypeDefinition() : t; return def.getErasedType(); }
public Key key(final Type<?> type, final TypeList typeArguments) { return new Key(type.isGenericType() ? type.getGenericTypeDefinition() : type, typeArguments); }
public StringBuilder appendErasedSignature(final StringBuilder sb) { if (isGenericType() && !isGenericTypeDefinition()) { return getGenericTypeDefinition().appendErasedSignature(sb); } return _appendErasedClassSignature(sb); }
public StringBuilder appendErasedSignature(final StringBuilder sb) { if (isGenericType() && !isGenericTypeDefinition()) { return getGenericTypeDefinition().appendErasedSignature(sb); } return _appendErasedClassSignature(sb); }
public StringBuilder appendErasedSignature(final StringBuilder sb) { if (isGenericType() && !isGenericTypeDefinition()) { return getGenericTypeDefinition().appendErasedSignature(sb); } return _appendErasedClassSignature(sb); }
@Override public Type<?> visitClassType(final Type<?> type, final TypeBindings bindings) { if (bindings.containsGenericParameter(type)) { return bindings.getBoundType(type); } final TypeBindings oldTypeBindings = type.getTypeBindings(); final TypeBindings newTypeBindings = visitTypeBindings(oldTypeBindings, bindings); if (oldTypeBindings != newTypeBindings) { return type.getGenericTypeDefinition().makeGenericType(newTypeBindings.getBoundTypes()); } return type; }
@NotNull protected Type getUnderlyingTypeCore() { if (hasElementType()) { return getElementType(); } if (isGenericType()) { return getGenericTypeDefinition(); } if (hasExtendsBound()) { return getExtendsBound(); } return this; }