Returns a new instance with the given identifier flag.
435430
public function withIdentifier(bool $identifier): self
    {
        $metadata = clone $this;
        $metadata->identifier = $identifier;

        return $metadata;
    }
690984
def get(self, identifier):
        """"""
        for provider in self._providers:
            if provider.identifier == identifier:
                return provider
        return None
132659
public Method get(final MethodIdentifier identifier) {
        // search for available methods
        readWriteLock.readLock().lock();
        try {
            final Optional<? extends IdentifiableMethod> method = availableMethods.stream().filter(m -> m.matches(identifier)).findAny();
            if (method.isPresent())
                return method.get();
        } finally {
            readWriteLock.readLock().unlock();
        }

        // apply default behaviour
        return DEFAULT_METHOD.apply(identifier);
    }
132063
public static IdGenerator newFlakeIdGenerator(MachineIdProvider machineIdProvider) {
        EncodingProvider encodingProvider = new FlakeEncodingProvider(machineIdProvider.getMachineId());
        return new DefaultIdGenerator(new SystemTimeProvider(), encodingProvider);
    }
28731
public Value createValue(Identifier value)
   {
      if (value == null)
         return null;
      try
      {
         return new ReferenceValue(value);
      }
      catch (IOException e)
      {
         LOG.warn("Cannot create REFERENCE Value from Identifier " + value, e);
         return null;
      }
   }
56720
public function getConfigurationObjectForIdentifier(string $identifier): ObjectInterface
    {
        if (isset($this->identifiers[$identifier]) === true) {
            return $this->identifiers[$identifier];
        }

        return new Blackhole();
    }
676478
public boolean createId(final String identifier) {

		if (identifier == null) {
			log.error("Unable to create a null Identifier.");
			return false;
		}

		if (this.originString == null) {
			log.error("Origin has not been set.  Cannot create Identifiers without a valid origin.");
			return false;
		}

		CreateIdentifierMessage message = new CreateIdentifierMessage();
		message.setCreationTime(System.currentTimeMillis());
		message.setOrigin(this.originString);
		message.setId(identifier);

		this.session.write(message);
		log.debug("Sent {}", message);

		return true;
	}
125628
def _new_instance(self):
        

        new_obj = self.__class__()
        new_obj.class_ = self.class_
        new_obj.tag = self.tag
        new_obj.implicit = self.implicit
        new_obj.explicit = self.explicit
        return new_obj
1193972
public static Matcher<ContextElement> identifier(final Matcher<Class<?>> matcher) {
    return new Matcher<ContextElement>() {

      @Override
      protected boolean matchesSafely(ContextElement t) {
        return matcher.matches(t.identifier());
      }

      @Override
      public String toString() {
        return "an identifier that is " + matcher;
      }
    };

  }
1115295
public static function get($identifier = 'default')
    {
        if (!array_key_exists($identifier, self::$instances)) {
            self::$instances[$identifier] = static::create();
        }

        return self::$instances[$identifier];
    }
868043
def new(cls, user, provider, federated_id):
        
        if cls.get_user(provider, federated_id):
            raise exceptions.AuthError("Federation already")

        return cls.create(user_id=user.id,
                          provider=provider,
                          federated_id=federated_id)
166065
public IDLProxyObject newInstnace() {
        try {
            Object object = cls.newInstance();
            return new IDLProxyObject(codec, object, cls);
        } catch (Exception e) {
            throw new RuntimeException(e.getMessage(), e);
        }
    }
1290581
def ConsumeIdentifier(self):
    
    result = self.token
    if not self._IDENTIFIER.match(result):
      raise self.ParseError('Expected identifier.')
    self.NextToken()
    return result
26144
public static ValidationResult validateIdentifier(String identifier, IdentifierType type)
   {
      if (Strings.isNullOrEmpty(identifier))
         return new ValidationResult(ERROR, Messages.notNullOrEmpty(type));
      if (isReservedWord(identifier))
      {
         return new ValidationResult(ERROR, Messages.isAJavaKeyWord(identifier));
      }
      int javaLetter = identifier.codePointAt(0);
      if (!Character.isJavaIdentifierStart(javaLetter))
      {
         return new ValidationResult(ERROR, Messages.containsInvalidCharacters(identifier));
      }
      for (int ctr = 1; ctr < identifier.length(); ctr++)
      {
         int javaLetterOrDigit = identifier.codePointAt(ctr);
         if (!Character.isJavaIdentifierPart(javaLetterOrDigit))
         {
            return new ValidationResult(ERROR, Messages.containsInvalidCharacters(identifier));
         }
      }
      if (CLASS_NAME.equals(type) && identifier.contains("$"))
      {
         return new ValidationResult(WARNING, "The use of '$' in class names is discouraged.");
      }
      else
      {
         return new ValidationResult(INFO);
      }
   }
267983
def set_id(self, identifier):
        
        self._id = identifier
        refobj = self.get_refobj()
        if refobj:
            self.get_refobjinter().set_id(refobj, identifier)
136971
@Override
    public IdentificationRequestMessage createIDR() {
        IdentificationRequestMessage msg = new IdentificationRequestMessageImpl(_IDR_HOLDER.mandatoryCodes,
                _IDR_HOLDER.mandatoryVariableCodes, _IDR_HOLDER.optionalCodes, _IDR_HOLDER.mandatoryCodeToIndex,
                _IDR_HOLDER.mandatoryVariableCodeToIndex, _IDR_HOLDER.optionalCodeToIndex);
        return msg;
    }
1243124
static function instance( $identifier = false )
    {
        if ( $identifier === false )
        {
            $fileINI = eZINI::instance( 'file.ini' );
            $identifier = $fileINI->variable( 'BinaryFileSettings', 'Handler' );
        }
        $instance =& $GLOBALS['eZBinaryFileHandlerInstance-' . $identifier];
        if ( !isset( $instance ) )
        {
            $optionArray = array( 'iniFile'     => 'file.ini',
                                  'iniSection'  => 'BinaryFileSettings',
                                  'iniVariable' => 'Handler'  );

            $options = new ezpExtensionOptions( $optionArray );

            $instance = eZExtension::getHandlerClass( $options );

            if( $instance === false )
            {
                eZDebug::writeError( "Could not find binary file handler '$identifier'", __METHOD__ );
            }
        }
        return $instance;
    }