@Override public List<LightweightTypeReference> getMultiTypeComponents() { return expose(components); } }
private String getAsString(Function<? super LightweightTypeReference, ? extends String> format) { return Joiner.on(synonym ? " | " : " & ").join(Iterables.transform(expose(components), format)); }
@Override public boolean isRawType() { for(LightweightTypeReference component: expose(components)) { if (component.isRawType()) return true; } return false; }
@Override public boolean isArray() { for(LightweightTypeReference component: expose(components)) { if (component.isArray()) return true; } return false; }
@Override public boolean isWrapper() { for(LightweightTypeReference component: expose(components)) { if (component.isWrapper()) return true; } return false; }
@Override public boolean isPrimitive() { for(LightweightTypeReference component: expose(components)) { if (component.isPrimitive()) return true; } return false; }
@Override public boolean isInterfaceType() { for(LightweightTypeReference component: expose(components)) { if (component.isInterfaceType()) return true; } return false; }
@Override public boolean isAny() { for(LightweightTypeReference component: expose(components)) { if (component.isAny()) return true; } return false; }
@Override public boolean isAnonymous() { for(LightweightTypeReference component: expose(components)) { if (component.isAnonymous()) return true; } return false; }
@Override public boolean isPrimitiveVoid() { for(LightweightTypeReference component: expose(components)) { if (component.isPrimitiveVoid()) return true; } return false; }
private boolean isAllRawType() { for(LightweightTypeReference component: expose(components)) { if (!component.isRawType()) return false; } return true; }
@Override public FunctionTypeKind getFunctionTypeKind() { for(LightweightTypeReference component: expose(components)) { if (component.isFunctionType()) { FunctionTypeKind kind = getFunctionTypeKind(); if (kind != FunctionTypeKind.NONE) { return kind; } } } return FunctionTypeKind.NONE; }
@Override public boolean isOwnedBy(ITypeReferenceOwner owner) { if (super.isOwnedBy(owner)) { for (LightweightTypeReference parameterType : expose(components)) { if (!parameterType.isOwnedBy(owner)) { return false; } } return true; } return false; }
@Override public LightweightTypeReference getRawTypeReference() { if (isAllRawType()) { return this; } CompoundTypeReference result = getOwner().newCompoundTypeReference(isSynonym()); for(LightweightTypeReference component: expose(components)) { result.addComponent(component.getRawTypeReference()); } return result; }