protected void createFragment(String signature, StringBuilder uriBuilder) { int signatureKind = Signature.getTypeSignatureKind(signature); switch (signatureKind) { case Signature.BASE_TYPE_SIGNATURE: createFragmentForPrimitive(signature, uriBuilder); return; case Signature.CLASS_TYPE_SIGNATURE: createFragmentForClass(signature, uriBuilder); return; case Signature.ARRAY_TYPE_SIGNATURE: createFragmentForArray(signature, uriBuilder); return; case Signature.TYPE_VARIABLE_SIGNATURE: createFragmentForTypeVariable(signature, uriBuilder); return; default: throw new IllegalStateException("Unexpected Signature: " + signature); } }
protected void createFragment(ITypeBinding typeBinding, StringBuilder uriBuilder) { if (typeBinding.isPrimitive()) { createFragmentForPrimitive(typeBinding, uriBuilder); return; } if (typeBinding.isArray()) { createFragmentForArray(typeBinding, uriBuilder); return; } if (typeBinding.isTypeVariable()) { createFragmentForTypeVariable(typeBinding, uriBuilder); return; } if (typeBinding.isAnnotation() || typeBinding.isClass() || typeBinding.isInterface() || typeBinding.isEnum()) { createFragmentForClass(typeBinding, uriBuilder); return; } throw new IllegalStateException("Unexpected type binding: " + typeBinding); }