Create parameters necessary for converting a token into a source

@param tokenId the id of the {@link Token} to be converted into a source.
@return a {@link SourceParams} object that can be used to create a source.
335606
@NonNull
    public static SourceParams createSourceFromTokenParams(String tokenId) {
        SourceParams sourceParams = SourceParams.createCustomParams();
        sourceParams.setType(Source.CARD);
        sourceParams.setToken(tokenId);
        return sourceParams;
    }
1312745
public static <X> String createParameterId(AnnotatedParameter<X> annotatedParameter) {
        return createParameterId(annotatedParameter.getBaseType(), annotatedParameter.getAnnotations());
    }
903713
public static Expression id(String id) {
    CodeChunkUtils.checkId(id);
    return Leaf.create(id, /* isCheap= */ true);
  }
319796
public CoreLabel makeToken(String tokenText, String originalText, int begin, int length) {
    CoreLabel cl = addIndices ? new CoreLabel(5) : new CoreLabel();
    cl.setValue(tokenText);
    cl.setWord(tokenText);
    cl.setOriginalText(originalText);
    if(addIndices) {
      cl.set(CharacterOffsetBeginAnnotation.class, begin);
      cl.set(CharacterOffsetEndAnnotation.class, begin+length);
    }
    return cl;
  }
170279
public static PrimitiveId from(String id) {
    return from(Hashing.sha256().hashString(id, StandardCharsets.UTF_8).asLong());
  }
178959
@Post("/tokens")
    @StatusCode(201)
    @ResponseConverter(CreateApiResponseConverter.class)
    public CompletableFuture<HttpResult<Token>> createToken(@Param("appId") String appId,
                                                                    @Param("isAdmin") boolean isAdmin,
                                                                    Author author, User loginUser) {
        checkArgument(!isAdmin || loginUser.isAdmin(),
                      "Only administrators are allowed to create an admin-level token.");
        return mds.createToken(author, appId, isAdmin)
                  .thenCompose(unused -> mds.findTokenByAppId(appId))
                  .thenApply(token -> {
                      final HttpHeaders headers = HttpHeaders.of(HttpStatus.CREATED)
                                                             .add(HttpHeaderNames.LOCATION, "/tokens/" + appId);
                      return HttpResult.of(headers, token);
                  });
    }
898547
public StructuredDataId makeId(final StructuredDataId id) {
        if (id == null) {
            return this;
        }
        return makeId(id.getName(), id.getEnterpriseNumber());
    }
727138
public function createToken(array $tokenData, $userId = null)
    {
        $userId = $this->_checkUserId($userId);
        return $this->getTokenLibrary()->createToken($tokenData, $userId);
    }
1120860
public UserEntity createNewUser(String userId) {
    checkAuthorization(Permissions.CREATE, Resources.USER, null);
    return new UserEntity(userId);
  }
457644
private HashMap<String, String> createTokenRequestParams(String grantCode) {

        HashMap<String, String> params = new HashMap<>();

        params.put("code", grantCode);
        params.put("client_id", preferences.clientId.get());
        params.put("grant_type", "authorization_code");
        params.put("redirect_uri", HTTP_LOCALHOST);

        return params;
    }
966901
public Integer add(MtasToken token) {
    Integer id = token.getId();
    tokenCollection.put(id, token);
    return id;
  }
38572
public static final void signAuthToken(AuthToken token) {
        String signature = generateSignature(token);
        token.setSignature(signature);
    }
285364
private static Token createPlainToken(final String placeholder) {
		int splitIndex = placeholder.indexOf(':');
		Token token;

		if (splitIndex == -1) {
			token = createPlainToken(placeholder.trim(), null);
		} else {
			String name = placeholder.substring(0, splitIndex).trim();
			String configuration = placeholder.substring(splitIndex + 1).trim();
			token = createPlainToken(name, configuration);
		}

		return token == null ? new PlainTextToken(placeholder) : token;
	}
1033159
public Payment createWithToken( String token ) {
    ValidationUtils.validatesToken( token );

    ParameterMap<String, String> params = new ParameterMap<String, String>();
    params.add( "token", token );

    return RestfulUtils.create( PaymentService.PATH, params, Payment.class, super.httpClient );
  }
858324
boolean addIdParaToken(Token idToken, Token paraToken) {
		tokens.add(idToken);
		tokens.add(paraToken);
		
		// if (lookForwardLineFeed() && (deletePreviousTextTokenBlankTails() || lexemeBegin == 0)) {
		if (lookForwardLineFeedAndEof() && deletePreviousTextTokenBlankTails()) {
			prepareNextScan(peek() != EOF ? 1 : 0);
		} else {
			prepareNextScan(0);
		}
		previousTextToken = null;
		return true;
	}
471009
public function tokenCreate($id, $token = null, $data = null){
		return $this->object->tokenCreate($id, $token, $data);
	}
1143450
public SourcedToken[] sourcedTokenize(String input,String source) 
    {
        Token[] tokens = tokenize(input);
        SourcedToken[] sourcedTokens = new SourcedToken[tokens.length];
        for (int i=0; i<tokens.length; i++) {
            String key = tokens[i].getValue()+"@"+source;
            if (tokMap.get(key)==null) {
                tokMap.put(key,new Integer(++nextId));
            }
            int id = ((Integer)tokMap.get(key)).intValue();
            sourcedTokens[i] = new BasicSourcedToken(id, tokens[i].getValue(), source);
        }
        return sourcedTokens;
    }