Check the type store for the requested type.
If found in the type store, the type and any required super and attribute types
are loaded from the type store, and added to the cache.
327167
@Override
    public IDataType onTypeFault(String typeName) throws AtlasException {

        // Type is not cached - check the type store.
        // Any super and attribute types needed by the requested type
        // which are not cached will also be loaded from the store.
        Context context = new Context();
        TypesDef typesDef = getTypeFromStore(typeName, context);
        if (typesDef.isEmpty()) {
            // Type not found in the type store.
            return null;
        }

        // Add all types that were loaded from the store to the cache.
        TransientTypeSystem transientTypeSystem = typeSystem.createTransientTypeSystem(context.getTypesDef(), false);
        Map<String, IDataType> typesAdded = transientTypeSystem.getTypesAdded();
        putAll(typesAdded.values());
        return typesAdded.get(typeName);
    }
794438
def is_config_type(type_):
    

    return (
        isinstance(type_, type)
        and hasattr(type_, "__attrs_attrs__")
        and hasattr(type_, CONFIG_KEY)
    )
769545
protected function checkLoaded()
	{
		if ( ! $this->modified ) {
		//	$this->storage = json_decode(json_encode($this->read()), true);
			$this->storage  = $this->read();
			$this->modified = true;
		}
	}
281146
private boolean addType(TypeDefinition type) {

        if (type == null) {
            return false;
        }

        if (type.getBaseTypeId() == null) {
            return false;
        }

        // find base type
        TypeDefinition baseType = null;
        if (type.getBaseTypeId() == BaseTypeId.CMIS_DOCUMENT) {
            baseType = copyTypeDefintion(m_types.get(DOCUMENT_TYPE_ID).getTypeDefinition());
        } else if (type.getBaseTypeId() == BaseTypeId.CMIS_FOLDER) {
            baseType = copyTypeDefintion(m_types.get(FOLDER_TYPE_ID).getTypeDefinition());
        } else if (type.getBaseTypeId() == BaseTypeId.CMIS_RELATIONSHIP) {
            baseType = copyTypeDefintion(m_types.get(RELATIONSHIP_TYPE_ID).getTypeDefinition());
        } else if (type.getBaseTypeId() == BaseTypeId.CMIS_POLICY) {
            baseType = copyTypeDefintion(m_types.get(POLICY_TYPE_ID).getTypeDefinition());
        } else {
            return false;
        }

        AbstractTypeDefinition newType = (AbstractTypeDefinition)copyTypeDefintion(type);

        // copy property definition
        for (PropertyDefinition<?> propDef : baseType.getPropertyDefinitions().values()) {
            ((AbstractPropertyDefinition<?>)propDef).setIsInherited(Boolean.TRUE);
            newType.addPropertyDefinition(propDef);
        }

        // add it
        addTypeInternal(newType);
        return true;
    }
773851
static boolean isRawType(TypeMirror typeMirror) {
    Set<TypeParameterElement> visited = new HashSet<>();
    return typeMirror.accept(CheckRawTypesVisitor.INSTANCE, visited);
  }
1301843
private boolean verifyTypes()
    {
        SuccessAndResult<ThriftType> output = topologicalSort(thriftTypes, new Predicate<ThriftType>()
        {
            @Override
            public boolean apply(@Nullable ThriftType t)
            {
                ThriftProtocolType proto = checkNotNull(t).getProtocolType();
                if (proto == ThriftProtocolType.ENUM || proto == ThriftProtocolType.STRUCT) {
                    return verifyStruct(t, true);
                } else {
                    Preconditions.checkState(false, "Top-level non-enum and non-struct?");
                    return false;   // silence compiler
                }
            }
        });
        if (output.success) {
            thriftTypes = output.result;
            return true;
        } else {
            for (ThriftType t: output.result) {
                // we know it's gonna fail, we just want the precise error message
                verifyStruct(t, false);
            }
            return false;
        }
    }
1078833
public boolean addRequiredParams(JSType ...types) {
    if (hasOptionalOrVarArgs()) {
      return false;
    }

    for (JSType type : types) {
      newParameter(type);
    }
    return true;
  }
378872
private static void registerAllTypeFactories(GsonBuilder gsonBuilder) {
        ServiceLoader<TypeAdapterFactory> loader = ServiceLoader.load(TypeAdapterFactory.class);
        for (TypeAdapterFactory typeFactory : loader) {
            if (logger.isLoggable(Level.FINE)) {
                logger.fine("Add gson type factory: " + typeFactory.getClass().getName());
            }
            gsonBuilder.registerTypeAdapterFactory(typeFactory);
        }
    }
496984
private void loadStorageForFetch(CodeBuilder b, TypeDesc type) {
        b.loadThis();
        b.loadField(SUPPORT_FIELD_NAME, mSupportType);
        TypeDesc storageType = TypeDesc.forClass(Storage.class);

        TypeDesc repositoryType = TypeDesc.forClass(Repository.class);
        b.invokeInterface
            (mSupportType, "getRootRepository", repositoryType, null);
        b.loadConstant(type);

        // This may throw a RepositoryException.
        Label tryStart = b.createLabel().setLocation();
        b.invokeInterface(repositoryType, STORAGE_FOR_METHOD_NAME, storageType,
                          new TypeDesc[]{TypeDesc.forClass(Class.class)});
        Label tryEnd = b.createLabel().setLocation();
        Label noException = b.createLabel();
        b.branch(noException);

        b.exceptionHandler(tryStart, tryEnd,
                           RepositoryException.class.getName());
        b.invokeVirtual
            (RepositoryException.class.getName(), "toFetchException",
             TypeDesc.forClass(FetchException.class), null);
        b.throwObject();

        noException.setLocation();
    }
400262
public function verifySettings()
    {
        if ($this->type === null) {
            $this->setError("The type attribute is required");
        } elseif (!in_array($this->type, self::$types, true)) {
            $this->setError("Invalid type specified; must be one of (" . implode(self::$types) . ")");
        }
    }
122197
@Check(CheckType.FAST)
	public void checkSuperTypes(SarlCapacity capacity) {
		checkSuperTypes(
				capacity,
				SARL_CAPACITY__EXTENDS,
				capacity.getExtends(),
				Capacity.class,
				false);
	}
821176
public boolean isType(final org.efaps.admin.datamodel.Type _type)
    {
        return getType().equals(_type);
    }
20029
def _walk_for_type(self, check_type):
        """"""
        for class_name, properties in sorted(self.resources.items()):
            for key, value in sorted(properties.items()):
                if self._check_type(check_type, value):
                    return True
        for class_name, properties in sorted(self.properties.items()):
            for key, value in sorted(properties.items()):
                if self._check_type(check_type, value):
                    return True

        return False
654228
def type_check(thetype, data, bindings = None):
    
    if not bindings: bindings = Bindings()
    if isinstance(thetype, core.RecordType):
        for name,child in zip(thetype.child_names, thetype.child_types):
            value = data[name]
            type_check(child, value, bindings)
    elif isinstance(thetype, core.TupleType):
        assert isinstance(data, tuple)
        assert len(data) == len(thetype.child_types)
        for value,child_type in zip(data, thetype.child_types):
            type_check(child_type, value, bindings)
    elif isinstance(thetype, core.UnionType):
        assert isinstance(thetype, dict)
        children = [(name,child) for name,child in zip(thetype.child_names, thetype.child_types) if name in data]
        assert len(fields) == 1, "0 or more than 1 entry in Union"
        child_name,child_type = children[0]
        type_check(child_type, data[child_name], bindings)
    elif isinstance(thetype, core.TypeApp):
        # Type applications are tricky.  These will "affect" bindings
        bindings.push()
        for k,v in thetype.param_values.items():
            bindings[k] = v
        type_check(thetype.root_type, data, bindings)
        bindings.pop()
    elif isinstance(thetype, core.TypeVar):
        # Find the binding for this type variable
        bound_type = bindings[thetype.name]
        if bound_type is None:
            raise errors.ValidationError("TypeVar(%s) is not bound to a type." % thetype.name)
        type_check(bound_type, data, bindings)
    elif isinstance(thetype, core.NativeType):
        # Native types are interesting - these can be plain types such as Int, Float etc
        # or they can be generic types like Array<T>, Map<K,V>
        # While plain types are fine, generic types (ie native types with args) pose a problem.
        # How do we perform type checking on "contents" of the data given native types.
        # We need native types to be able to apply mapper functions on data as they see fit.
        # So to deal with custom validations on native types we need
        # native types to expose mapper functors for us!!!
        if thetype.args and thetype.mapper_functor:
            def type_check_functor(*values):
                for arg, value in zip(thetype.args, values):
                    bound_type = bindings[arg]
                    if bound_type is None:
                        raise errors.ValidationError("Arg(%s) is not bound to a type." % arg)
                    type_check(bound_type, value)
            thetype.mapper_functor(type_check_functor, data)

    # Finally apply any other validators that were nominated 
    # specifically for that particular type
    if thetype.validator:
        thetype.validator(thetype, data, bindings)
758093
def possible_types(type)
      if type.kind.interface?
        schema.possible_types(type)
      elsif type.kind.union?
        type.possible_types
      end
    end
682635
def insertDatastore(self, index, store):
    ''''''
    if not isinstance(store, Datastore):
      raise TypeError("stores must be of type %s" % Datastore)

    self._stores.insert(index, store)
1096729
protected void addType(final Long _typeId)
    {
        if (!this.types.contains(_typeId)) {
            this.types.add(_typeId);
            setDirty();
        }
    }