Create a string matching various object types (object constructor name if explicit)
@name    objectType
@access  internal
@param   string  type
@param   object  variable
@param   bool    explicit typing
@return  string  types
557514
function objectType(type, variable, explicit) {
		//  array get some special treatment by indicating it is not an object but instead an array
		//  this also goes for inherited types
		if (variable instanceof Array) {
			type = 'array';
		}

		return variable ? variable.constructor.name + (explicit ? '' : '|' + type) : 'null';
	}
1143273
public void setObjectType(String v) {
    if (TextObject_Type.featOkTst && ((TextObject_Type)jcasType).casFeat_objectType == null)
      jcasType.jcas.throwFeatMissing("objectType", "de.julielab.jules.types.TextObject");
    jcasType.ll_cas.ll_setStringValue(addr, ((TextObject_Type)jcasType).casFeatCode_objectType, v);}
641664
public function createObjectType() : ObjectConstructorCallbackDefiner
    {
        return new ObjectConstructorCallbackDefiner($this->class, function (callable $typeCallback) {
            $this->createObjectCallback = function (array $input) use ($typeCallback) {
                $className = $this->class->getClassName();

                /** @var TypedObject|string $instanceOrType */
                $instanceOrType = $typeCallback($input);

                if (is_string($instanceOrType)) {
                    if (class_exists($instanceOrType) && is_a($instanceOrType, $className, true)) {
                        $instanceOrType = $instanceOrType::definition()->newCleanInstance();
                    }
                }

                if (!($instanceOrType instanceof $className)) {
                    throw InvalidReturnValueException::format(
                        'Invalid create object callback return value: expecting class compatible with %s, %s given',
                        $className, is_string($instanceOrType) ? $instanceOrType : Debug::getType($instanceOrType)
                    );
                }

                return $instanceOrType;
            };
        });
    }
1188892
static String actualTypeParametersString(TypeElement type) {
    List<? extends TypeParameterElement> typeParameters = type.getTypeParameters();
    if (typeParameters.isEmpty()) {
      return "";
    } else {
      return typeParameters
          .stream()
          .map(e -> e.getSimpleName().toString())
          .collect(joining(", ", "<", ">"));
    }
  }
179589
public static String print(Type type) {
        return type.match(new Type.MatchBlock<String>(){
            @Override
            public String _case(Ref x) {
                return print(x.type);
            }

            @Override
            public String _case(Primitive x) {
                return print(x.type);
            }
            
        });
    }
835937
public static String typeString(Object value) {
        return null == value || Primitive.NULL == value
            ? "null"
            : value instanceof Primitive
                ? ((Primitive) value).getType().getSimpleName()
                : typeString(value.getClass());
    }
63022
function createObject (type, options) {
    // retrieve the test functions for each of the objects properties
    var tests = {},
        prop;
    for (prop in type) {
      if (type.hasOwnProperty(prop)) {
        tests[prop] = ducktype(type[prop]).test;
      }
    }

    // non-empty object
    var isObject = basic.object.test;
    return new DuckType({
      name: options && options.name || null,
      test: function test (object) {
        var prop;
        
        // test whether we have an object
        if (!isObject(object)) {
          return false;
        }

        // test each of the defined properties
        for (prop in tests) {
          if (tests.hasOwnProperty(prop)) {
            if (!tests[prop](object[prop])) {
              return false;
            }
          }
        }
        return true;
      }
    });
  }
909131
public static String displayWithTypes(Object object) {
        StringBuilder builder = new StringBuilder();
        displayRecursive(object, builder, new Stack<>(), true);
        return builder.toString();
    }
236675
function varType( v )
{
  const [ , type ] = Object.prototype.toString.call( v ).match(/\[object\s(\w+)\]/);

  return type;
}
919843
public static SymbolType typeVariableOf(final String typeVariable, final Class<Object> clazz) {
        return new SymbolType(clazz, typeVariable);
    }
103920
static int objectType(Object value) {
    if (value instanceof String)
      return STRING;
    else if (value instanceof Boolean) // was BooleanValue
      return BOOLEAN;
    else if (value instanceof Number) //was NumericValue
      // NumericValue types are ordered INT..DOUBLE starting at zero.  Selector types are
      // ordered INT..DOUBLE starting at Selector.INT.
      return EvaluatorImpl.getType((Number) value) + Selector.INT; // was ((NumericValue) value).type()
    else if (value instanceof Serializable)
      return OBJECT;
    else
      return INVALID;
  }
416862
function isObjectLiteralType(type) {
            return type.symbol && (type.symbol.flags & (4096 /* ObjectLiteral */ | 2048 /* TypeLiteral */)) !== 0 &&
                getSignaturesOfType(type, 0 /* Call */).length === 0 &&
                getSignaturesOfType(type, 1 /* Construct */).length === 0;
        }
1368372
private static String createTypeId(Type type) {
        if (type instanceof Class<?>) {
            return Reflections.<Class<?>> cast(type).getName();
        }
        if (type instanceof ParameterizedType) {
            ParameterizedType parameterizedType = (ParameterizedType) type;
            StringBuilder builder = new StringBuilder();
            builder.append(createTypeId(parameterizedType.getRawType()));
            builder.append("<");
            for (int i = 0; i < parameterizedType.getActualTypeArguments().length; i++) {
                builder.append(createTypeId(parameterizedType.getActualTypeArguments()[i]));
                if (i != parameterizedType.getActualTypeArguments().length - 1) {
                    builder.append(",");
                }
            }
            builder.append(">");
            return builder.toString();
        }
        if (type instanceof TypeVariable<?>) {
            return Reflections.<TypeVariable<?>> cast(type).getName();
        }
        if (type instanceof GenericArrayType) {
            return createTypeId(Reflections.<GenericArrayType> cast(type).getGenericComponentType());
        }
        throw new java.lang.IllegalArgumentException("Unknown type " + type);
    }
957272
public static ObjectName createObjectName(String domain, String type) {
        try {
            return new ObjectName(domain + ":type=" + type);
        } catch(MalformedObjectNameException e) {
            throw new VoldemortException(e);
        }
    }
1297518
public static String encode(Object o) {
        Type type = typeOf(o);
        return type.encode(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;
  }
328144
public static X509Name getInstance(
                                       ASN1TaggedObject obj,
                                       boolean explicit)
    {
        return getInstance(ASN1Sequence.getInstance(obj, explicit));
    }