Determine the type of the Object passed in and add the XML format
for the result.

@param type
@param name
@param o
@return StringBuilder
547153
static private StringBuilder determineType(String name, Object o) {
        String value = null;
        if (o instanceof String || o instanceof StringBuffer || o instanceof java.nio.CharBuffer || o instanceof Integer || o instanceof Long || o instanceof Byte
            || o instanceof Double || o instanceof Float || o instanceof Short || o instanceof BigInteger || o instanceof java.math.BigDecimal) {
            value = o.toString();
        } else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Skipping class: " + o.getClass());
            }
            return null;
        }

        // type="class" name="o"
        StringBuilder buffer = new StringBuilder(48);
        buffer.append(name);
        buffer.append("type=\"");
        // charbuffer is abstract so we might get HeapCharBuffer here, force it
        // to the generic layer in the XML output
        if (o instanceof java.nio.CharBuffer) {
            buffer.append("java.nio.CharBuffer");
        } else {
            buffer.append(o.getClass().getName());
        }
        buffer.append("\" ");
        buffer.append(name);
        buffer.append("=\"");
        buffer.append(value);
        buffer.append("\"");
        return buffer;
    }
773575
public <T>  T get(String name, Class<T> type){
        Object o = context.get(name);
        return o == null? null : (T) o;
    }
654194
public ObjectName createCustomComponentMBeanName(final String type, final String name) {
    ObjectName result = null;
    String tmp = jmxDomainName + ":" +
                 "type=" + sanitizeString(type) +
                 ",name=" + sanitizeString(name);
    try {
      result = new ObjectName(tmp);
    } catch (MalformedObjectNameException e) {
      error("Couldn't create ObjectName from: " + type + " , " + name);
    }
    return result;
  }
1327287
private PTypeList convertGeneric(String name)
	{
		String nameNoLessOrGreater = name.substring(name.indexOf("<") + 1, name.length() - 1);

		String[] typeStrings = nameNoLessOrGreater.split(",");

		// decide if the split is valid or if the type is a single generic type
		boolean notSingleGenericType = true;
		for (String part : typeStrings)
		{
			if (part.replaceAll("[^<]", "").length() != part.replaceAll("[^>]", "").length())
			{
				notSingleGenericType = false;
			}
		}

		PTypeList types = new PTypeList();
		if (notSingleGenericType)
		{
			for (String t : typeStrings)
			{
				types.add(convert(t, null));
			}
		} else
		{
			types.add(convert(nameNoLessOrGreater, null));
		}
		return types;
	}
1269846
@GET
    @Path("/typedef/name/{name}")
    @Produces(Servlets.JSON_MEDIA_TYPE)
    public AtlasBaseTypeDef getTypeDefByName(@PathParam("name") String name) throws AtlasBaseException {
        AtlasBaseTypeDef ret = typeDefStore.getByName(name);

        return ret;
    }
178904
public function &get($type, $name)
    {
        if ($this->_initialized) {
            $type = strtolower($type);
            if (false == key_exists($type, $this->types)) {
                return PEAR::raiseError("No such type $type");
            }

            $name     = strtolower($name);
            $type_var = &$this->{'_' . $this->types[$type]};

            if (key_exists($name, $type_var)) {
                return $type_var[$name];
            } elseif (key_exists($name, $this->_oids) && $this->_oids[$name]['type'] == $type) {
                return $this->_oids[$name];
            } else {
                return PEAR::raiseError("Could not find $type $name");
            }
        } else {
            $return = null;
            return $return;
        }
    }
82046
protected static String createTypeName(String name) {

        StringBuffer result = new StringBuffer(32);
        result.append("OpenCms");
        result.append(name.substring(0, 1).toUpperCase());
        if (name.length() > 1) {
            result.append(name.substring(1));
        }
        return result.toString();
    }
483409
private XmlElement getXMLParam(Object o) throws XMLRPCException {
		XmlElement param = new XmlElement(XMLRPCClient.PARAM);
		XmlElement value = new XmlElement(XMLRPCClient.VALUE);
		param.addChildren(value);
		value.addChildren(serializerHandler.serialize(o));
		return param;
	}
1092004
public static JdbcType getJdbcTypeByName(String typeName)
    {
        JdbcType result = null;
        result = (JdbcType) jdbcObjectTypesFromName.get(typeName.toLowerCase());
        if (result == null)
        {
            throw new OJBRuntimeException("The type " + typeName + " can not be handled by OJB." +
                    " Please specify only types as defined by java.sql.Types.");
        }
        return result;
    }
656138
@Nullable
	public static Type evaluateJavaLangType(@Nonnull final String name) {
		Check.notEmpty(name, "name");
		Type ret = null;
		for (final Type type : JAVA_LANG_VALUE_TYPES) {
			if (type.getName().equals(name.replace("java.lang.", ""))) {
				ret = type;
				break;
			}
		}
		return ret;
	}
1128685
public ITypeParameterBuilder addTypeParameter(String name) {
		ITypeParameterBuilder builder = this.iTypeParameterBuilderProvider.get();
		final SarlInterface object = getSarlInterface();
		builder.eInit(object, name, getTypeResolutionContext());
		object.getTypeParameters().add(builder.getJvmTypeParameter());
		return builder;
	}
1340402
public static ObjectIdentifier getOID(String name) {
        OIDInfo info = nameMap.get(name);
        return (info == null) ? null : info.oid;
    }
895750
@Override
   @SuppressWarnings("unchecked")
   public <E, T extends Resource<E>> T getChildOfType(final Class<T> type, final String name) throws ResourceException
   {
      T result;
      Resource<?> child = getChild(name);
      if (type.isAssignableFrom(child.getClass()))
      {
         result = (T) child;
      }
      else if (child.exists())
      {
         throw new ResourceException("Requested resource [" + name + "] was not of type [" + type.getName()
                  + "], but was instead [" + child.getClass().getName() + "]");
      }
      else
      {
         E underlyingResource = (E) child.getUnderlyingResourceObject();
         result = getResourceFactory().create(type, underlyingResource);
      }
      return result;
   }
1191919
public RestQueryResult addColumn( String name,
                                      String type ) {
        if (!StringUtil.isBlank(name)) {
            columns.put(name, type);
        }
        return this;
    }
1021464
private Class<?> beanType(String name) {
		Class<?> type = context.getType(name);
		if (ClassUtils.isCglibProxyClass(type)) {
			return AopProxyUtils.ultimateTargetClass(context.getBean(name));
		}
		return type;
	}
610115
private TypePair getPropertyType(Object bean, String name) throws IllegalAccessException, InvocationTargetException {
        try {
            PropertyDescriptor propDescriptor = PropertyUtils.getPropertyDescriptor(bean, name);
            if(propDescriptor!=null) {
                Method m = propDescriptor.getWriteMethod();
                if(m!=null)
                    return new TypePair(m.getGenericParameterTypes()[0], m.getParameterTypes()[0]);
            }
        } catch (NoSuchMethodException e) {
            // no such property
        }

        // try a field
        try {
            return new TypePair(bean.getClass().getField(name));
        } catch (NoSuchFieldException e) {
            // no such field
        }

        return null;
    }
1296092
public String readDataType(String name) {
    if (name.equals("map")) {
      if (readChar() != '<') throw unexpected("expected '<'");
      String keyType = readDataType();
      if (readChar() != ',') throw unexpected("expected ','");
      String valueType = readDataType();
      if (readChar() != '>') throw unexpected("expected '>'");
      return String.format("map<%s, %s>", keyType, valueType);
    } else {
      return name;
    }
  }