} else if (value instanceof Map) {
Object jsonMap = encodeMap(valueType, (Map<?, ?>) value,
connectorTracker);
return new EncodeResult(jsonMap);
} else if (value instanceof Connector) {
Connector connector = (Connector) value;
if (value instanceof Component
&& !(AbstractCommunicationManager
.isComponentVisibleToClient((Component) value))) {
return encodeNull();
}
return new EncodeResult(connector.getConnectorId());
} else if (value instanceof Enum) {
return encodeEnum((Enum<?>) value, connectorTracker);
} else if (value instanceof JSONArray || value instanceof JSONObject) {
return new EncodeResult(value);
} else if (valueType instanceof Class<?>) {