Transfomiert einen lierale Zeichenkette. <br />
EBNF:<br />
<code>("'" {"##"|"''"|"#" impOp "#"| ?-"#"-"'" } "'") |
(""" {"##"|""""|"#" impOp "#"| ?-"#"-""" } """);</code>

@param data
@return CFXD Element
@throws TemplateException
426853
protected Expression string(Data data) throws TemplateException {

	// check starting character for a string literal
	if (!data.srcCode.isCurrent('"') && !data.srcCode.isCurrent('\'')) return null;
	Position line = data.srcCode.getPosition();

	// Init Parameter
	char quoter = data.srcCode.getCurrentLower();
	StringBuilder str = new StringBuilder();
	Expression expr = null;

	while (data.srcCode.hasNext()) {
	    data.srcCode.next();
	    // check sharp
	    if (data.srcCode.isCurrent('#')) {

		// Ecaped sharp
		if (data.srcCode.isNext('#')) {
		    data.srcCode.next();
		    str.append('#');
		}
		// get Content of sharp
		else {
		    data.srcCode.next();
		    comments(data);
		    Expression inner = assignOp(data);
		    comments(data);
		    if (!data.srcCode.isCurrent('#')) throw new TemplateException(data.srcCode, "Invalid Syntax Closing [#] not found");

		    ExprString exprStr = null;
		    if (str.length() != 0) {
			exprStr = data.factory.createLitString(str.toString(), line, data.srcCode.getPosition());
			if (expr != null) {
			    expr = data.factory.opString(expr, exprStr);
			}
			else expr = exprStr;
			str = new StringBuilder();
		    }
		    if (expr == null) {
			expr = inner;
		    }
		    else {
			expr = data.factory.opString(expr, inner);
		    }
		}
	    }
	    // check quoter
	    else if (data.srcCode.isCurrent(quoter)) {
		// Ecaped sharp
		if (data.srcCode.isNext(quoter)) {
		    data.srcCode.next();
		    str.append(quoter);
		}
		// finsish
		else {
		    break;
		}
	    }
	    // all other character
	    else {
		str.append(data.srcCode.getCurrent());
	    }
	}
	if (!data.srcCode.forwardIfCurrent(quoter)) throw new TemplateException(data.srcCode, "Invalid Syntax Closing [" + quoter + "] not found");

	if (expr == null) expr = data.factory.createLitString(str.toString(), line, data.srcCode.getPosition());
	else if (str.length() != 0) {
	    expr = data.factory.opString(expr, data.factory.createLitString(str.toString(), line, data.srcCode.getPosition()));
	}
	comments(data);

	if (expr instanceof Variable) {
	    Variable var = (Variable) expr;
	    var.fromHash(true);
	}

	return expr;

    }
988729
private Expression divMultiOp(Data data) throws TemplateException {
	Expression expr = expoOp(data);

	while (!data.srcCode.isLast()) {

	    // Multiply Operation
	    if (data.srcCode.forwardIfCurrent('*')) {
		expr = _divMultiOp(data, expr, Factory.OP_DBL_MULTIPLY);
		// comments(data);
		// expr=OpDouble.toExprDouble(expr, expoOp(), OpDouble.MULTIPLY);
	    }
	    // Divide Operation
	    else if (data.srcCode.isCurrent('/') && (!data.srcCode.isCurrent('/', '>'))) {
		data.srcCode.next();
		expr = _divMultiOp(data, expr, Factory.OP_DBL_DIVIDE);
		// comments(data);
		// expr=OpDouble.toExprDouble(expr, expoOp(), OpDouble.DIVIDE);
	    }
	    // Divide Operation
	    else if (data.srcCode.isCurrent('\\')) {
		data.srcCode.next();
		expr = _divMultiOp(data, expr, Factory.OP_DBL_INTDIV);
		// comments(data);
		// expr=OpDouble.toExprDouble(expr, expoOp(), OpDouble.INTDIV);
	    }
	    else {
		break;
	    }

	}
	return expr;
    }
1313054
private final boolean elseStatement(Data data, Condition cont) throws TemplateException {
	if (!data.srcCode.forwardIfCurrent("else", '{') && !data.srcCode.forwardIfCurrent("else ") && !data.srcCode.forwardIfCurrent("else", '/')) return false;

	// start (
	data.srcCode.previous();
	// ex block
	Body body = new BodyBase(data.factory);
	Pair p = cont.setElse(body, data.srcCode.getPosition(), null);

	Body prior = data.setParent(body);
	statement(data, body, CTX_ELSE);
	data.setParent(prior);

	p.end = data.srcCode.getPosition();
	return true;
    }
602682
public static function createOrNull($data = null)
    {
        static $request;
        if (!$request) {
            $request = Di::getDefault()->getShared('request');
        }

        if (!$request->isPost()) {
            return null;
        }

        $instance = new static();

        $_request = $request->get();

        if ($data === null || !isset($data[0])) {
            foreach ($instance->getSafeFields() as $field) {
                if (isset($_request[$field])) {
                    $instance->$field = $_request[$field];
                }
            }
        }

        if ($data) {
            foreach ($data as $k => $v) {
                if (is_int($k)) {
                    $field = $v;
                    if (!isset($_request[$field])) {
                        throw new MissingFieldException($field);
                    }
                    $instance->$field = $_request[$field];
                } else {
                    $instance->$k = $v;
                }
            }
        }

        return $instance->create();
    }
14767
private Expression negatePlusMinusOp(Data data) throws TemplateException {
	// And Operation
	Position line = data.srcCode.getPosition();
	if (data.srcCode.forwardIfCurrent('-')) {
	    // pre increment
	    if (data.srcCode.forwardIfCurrent('-')) {
		comments(data);
		Expression expr = clip(data);
		return data.factory.opUnary((Variable) expr, data.factory.DOUBLE_ONE(), Factory.OP_UNARY_PRE, Factory.OP_UNARY_MINUS, line, data.srcCode.getPosition());

		// ExprDouble res = OpDouble.toExprDouble(expr, LitDouble.toExprDouble(1D),OpDouble.MINUS);
		// return new OpVariable((Variable)expr,res,data.cfml.getPosition());

	    }
	    comments(data);
	    return data.factory.opNegateNumber(clip(data), Factory.OP_NEG_NBR_MINUS, line, data.srcCode.getPosition());

	}
	else if (data.srcCode.forwardIfCurrent('+')) {
	    if (data.srcCode.forwardIfCurrent('+')) {
		comments(data);
		Expression expr = clip(data);

		return data.factory.opUnary((Variable) expr, data.factory.DOUBLE_ONE(), Factory.OP_UNARY_PRE, Factory.OP_UNARY_PLUS, line, data.srcCode.getPosition());
	    }
	    comments(data);
	    return data.factory.toExprDouble(clip(data));// OpNegateNumber.toExprDouble(clip(),OpNegateNumber.PLUS,line);
	}
	return clip(data);
    }
858529
private final void switchBlock(Data data, Body body) throws TemplateException {
	while (data.srcCode.isValidIndex()) {
	    comments(data);
	    if (data.srcCode.isCurrent("case ") || data.srcCode.isCurrent("default", ':') || data.srcCode.isCurrent('}')) return;

	    Body prior = data.setParent(body);
	    statement(data, body, CTX_SWITCH);
	    data.setParent(prior);
	}
    }
1205481
private Statement expressionStatement(Data data, Body parent) throws TemplateException {

	// first we check if we have a access modifier
	int pos = data.srcCode.getPos();
	int access = -1;
	boolean _final = false;
	if (data.context == CTX_CFC || data.context == CTX_STATIC) {
	    if (data.srcCode.forwardIfCurrent("final ")) {
		_final = true;
		comments(data);
	    }
	    if (data.srcCode.forwardIfCurrent("private ")) {
		access = Component.ACCESS_PRIVATE;
		comments(data);
	    }
	    else if (data.srcCode.forwardIfCurrent("package ")) {
		access = Component.ACCESS_PACKAGE;
		comments(data);
	    }
	    else if (data.srcCode.forwardIfCurrent("public ")) {
		access = Component.ACCESS_PUBLIC;
		comments(data);
	    }
	    else if (data.srcCode.forwardIfCurrent("remote ")) {
		access = Component.ACCESS_REMOTE;
		// comments(data);
		throw new TemplateException(data.srcCode, "access modifier [remote] not supported in this context");

	    }
	    if (!_final && data.srcCode.forwardIfCurrent("final ")) {
		_final = true;
		comments(data);
	    }
	}
	Body prior = data.setParent(parent);
	Expression expr = expression(data);
	data.setParent(prior);
	checkSemiColonLineFeed(data, true, true, false);

	// variable declaration (variable in body)
	if (expr instanceof Variable) {
	    Variable v = (Variable) expr;
	    if (ASMUtil.isOnlyDataMember(v)) {

		expr = new Assign(v, data.factory.createEmpty(), data.srcCode.getPosition());
	    }
	}

	// if a specific access was defined
	if (access > -1 || _final) {
	    if (!(expr instanceof Assign)) {
		data.srcCode.setPos(pos);
		throw new TemplateException(data.srcCode, "invalid syntax, access modifier cannot be used in this context");
	    }
	    if (access > -1) {
		// this is only supported with the Lucee dialect
		// if(data.srcCode.getDialect()==CFMLEngine.DIALECT_CFML)
		// throw new TemplateException(data.srcCode,
		// "invalid syntax, access modifier cannot be used in this context");
		((Assign) expr).setAccess(access);
	    }
	    if (_final) ((Assign) expr).setModifier(Member.MODIFIER_FINAL);
	}

	if (expr instanceof FunctionAsExpression) return ((FunctionAsExpression) expr).getFunction();

	return new ExpressionAsStatement(expr);
    }
284543
public static String hexDecode(final String data) {
        if (StringUtils.isNotBlank(data)) {
            return hexDecode(data.toCharArray());
        }
        return null;
    }
988990
@SuppressWarnings({"unchecked", "rawtypes"})
    private Object fromXml(Class<?> clazz, Element node) throws Exception {
        Object obj = clazz.newInstance();

        List<Element> subNodes = node.elements();
        int sizeOfSubNodes = subNodes.size();

        for (int i = 0; i < sizeOfSubNodes; i++) {
            Element e = subNodes.get(i);
            String tagName = e.getName();

            Field field = null;
            if (TypeUtil.isPrimitiveType(tagName)) {
                field = clazz.getField("_" + tagName);
            }
            else {
                field = clazz.getField(tagName);
            }

            Class<?> fType = field.getType();
            boolean isFieldArray = fType.isArray();
            //if field is an array, adjust it to the component type
            if (isFieldArray) {
                fType = fType.getComponentType();
            }

            Class fRealType = fType;
            String xsiType = e.attributeValue(SoapConsts.XSI_TYPE);
            if (xsiType != null && (!xsiType.startsWith("xsd:"))) {
                fRealType = TypeUtil.getVimClass(xsiType);
            }

            if (fRealType == ManagedObjectReference.class) { // MOR
                if (isFieldArray) {
                    int sizeOfFieldArray = getNumberOfSameTags(subNodes, sizeOfSubNodes, i, tagName);
                    ManagedObjectReference[] mos = new ManagedObjectReference[sizeOfFieldArray];
                    for (int j = 0; j < sizeOfFieldArray; j++) {
                        Element elem = subNodes.get(j + i);
                        mos[j] = MorUtil.createMOR(elem.attributeValue("type"), elem.getText());
                    }
                    field.set(obj, mos);
                    i = i + sizeOfFieldArray - 1;
                }
                else {
                    field.set(obj, MorUtil.createMOR(e.attributeValue("type"), e.getText()));
                }
            }
            else if (fRealType.isEnum()) { // Enum type
                if (!isFieldArray) {
                    Object fo = Enum.valueOf(fRealType, e.getText());
                    field.set(obj, fo);
                }
                else {
                    int sizeOfFieldArray = getNumberOfSameTags(subNodes, sizeOfSubNodes, i, tagName);
                    Object ao = Array.newInstance(fRealType, sizeOfFieldArray);
                    for (int j = 0; j < sizeOfFieldArray; j++) {
                        String enumStr = ((Element) subNodes.get(j + i)).getText();
                        Array.set(ao, j, Enum.valueOf(fRealType, enumStr));
                    }
                    field.set(obj, ao);
                    i = i + sizeOfFieldArray - 1;
                }
            }
            else if (TypeUtil.isBasicType(fRealType)) { // basic data types
                if (isFieldArray) {
                    int sizeOfFieldArray = getNumberOfSameTags(subNodes, sizeOfSubNodes, i, tagName);

                    List<String> values = new ArrayList<String>();
                    for (int j = 0; j < sizeOfFieldArray; j++) {
                        values.add(subNodes.get(j + i).getText());
                    }

                    String fTrueType;
                    if (xsiType != null) {
                        fTrueType = xsiType.substring("xsd:".length()) + "[]";
                    }
                    else {
                        fTrueType = fRealType.getSimpleName();
                        if (!fTrueType.endsWith("[]")) {
                            fTrueType = fTrueType + "[]";
                        }
                    }
                    ReflectUtil.setObjectArrayField(obj, field, fTrueType, values);
                    i = i + sizeOfFieldArray - 1;
                }
                else {
                    if (xsiType != null) {
                        xsiType = xsiType.substring("xsd:".length());
                        ReflectUtil.setObjectField(obj, field, xsiType, e.getText());
                    }
                    else {
                        ReflectUtil.setObjectField(obj, field, fRealType.getSimpleName(), e.getText());
                    }
                }
            }
            else { //VIM type
                if (isFieldArray) {
                    int sizeOfFieldArray = getNumberOfSameTags(subNodes, sizeOfSubNodes, i, tagName);
                    // arrayTypeName = arrayTypeName.substring(0, arrayTypeName.length()-2);
                    Object ao = Array.newInstance(fType, sizeOfFieldArray);
                    String fGenericType = fType.getSimpleName();
                    for (int j = 0; j < sizeOfFieldArray; j++) {
                        Element elem = subNodes.get(j + i);
                        String elemXsiType = elem.attributeValue(SoapConsts.XSI_TYPE);
                        String elemType = elemXsiType != null ? elemXsiType : fGenericType;
                        Object o = fromXml(TypeUtil.getVimClass(elemType), elem);
                        Array.set(ao, j, o);
                    }
                    field.set(obj, ao);
                    i = i + sizeOfFieldArray - 1;
                }
                else { // single VIM
                    Object o = fromXml(fRealType, e);
                    field.set(obj, o);
                }
            }
        }
        return obj;
    }
297595
public static AVIMConversationMemberInfo createInstance(Map<String, Object> data) {
    if (null == data) {
      return null;
    }
    String conversationId = (String)data.get(ATTR_CONVID);
    String memberId = (String)data.get(ATTR_MEMBERID);
    String roleStr = (String)data.get(ATTR_ROLE);
    String objectId = (String)data.get(ATTR_OJBECTID);
    ConversationMemberRole role = ConversationMemberRole.fromString(roleStr);
    return new AVIMConversationMemberInfo(objectId, conversationId, memberId, role);
  }
114492
function(template, data){

    if (!template) {
      var error = new Error("Cannot render the template since it's false, null or undefined.");
      error.name = "TemplateNotFoundError";
      throw error;
    }

    var templateFunc;
    if (typeof template === "function"){
      templateFunc = template;
    } else {
      templateFunc = Marionette.TemplateCache.get(template);
    }

    return templateFunc(data);
  }
559029
public static XStream createTemplateXStream() {
        XStream xstream = new XStream(new DomDriver("UTF-8"));
        xstream.setMode(XStream.NO_REFERENCES);
        xstream.registerConverter(new FontConverter());
        
        xstream.alias("template", ReportTemplate.class);
        xstream.useAttributeFor(ReportTemplate.class, "version");
        xstream.alias("band-element", BandElement.class);
        xstream.alias("column-band-element", ColumnBandElement.class);
        
        return xstream;
    }
480323
public BaseDataJsonFieldBo setData(JsonNode data) {
        return setData(
                data == null || data instanceof MissingNode || data instanceof NullNode ? null
                        : SerializationUtils.toJson(data));
    }
1295610
public function createDefinitionForm($data): ?FormBuilderInterface
    {
        if (!$this->context->getDefinition()->hasMeta('form')) {
            return null;
        }

        $formConfig = $this->context->getDefinition()->getMeta('form') ?? [];
        $formType = $formConfig['type'] ?? null;
        if (!$formConfig || !$formType) {
            throw new \RuntimeException(sprintf('Can`t find a valid form for %s', $this->context->getDefinition()->getName()));
        }

        $options = [
            'allow_extra_fields' => true,
            'endpoint' => $this->context->getEndpoint()->getName(),
        ];

        if ($this->container->hasParameter('form.type_extension.csrf.enabled')
            && $this->container->getParameter('form.type_extension.csrf.enabled')) {
            $options['csrf_protection'] = false;
        }

        $options = array_merge($options, $formConfig['options'] ?? []);

        return $this->createFormBuilder($formType, $data, $options);
    }
294427
public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
  {

    // A bit of an ugly hack to get our context.
    ElemTemplateElement templElem =
      (ElemTemplateElement) xctxt.getNamespaceContext();
    StylesheetRoot ss = templElem.getStylesheetRoot();
    java.text.DecimalFormat formatter = null;
    java.text.DecimalFormatSymbols dfs = null;
    double num = getArg0().execute(xctxt).num();
    String patternStr = getArg1().execute(xctxt).str();

    // TODO: what should be the behavior here??
    if (patternStr.indexOf(0x00A4) > 0)
      ss.error(XSLTErrorResources.ER_CURRENCY_SIGN_ILLEGAL);  // currency sign not allowed

    // this third argument is not a locale name. It is the name of a
    // decimal-format declared in the stylesheet!(xsl:decimal-format
    try
    {
      Expression arg2Expr = getArg2();

      if (null != arg2Expr)
      {
        String dfName = arg2Expr.execute(xctxt).str();
        QName qname = new QName(dfName, xctxt.getNamespaceContext());

        dfs = ss.getDecimalFormatComposed(qname);

        if (null == dfs)
        {
          warn(xctxt, XSLTErrorResources.WG_NO_DECIMALFORMAT_DECLARATION,
               new Object[]{ dfName });  //"not found!!!

          //formatter = new java.text.DecimalFormat(patternStr);
        }
        else
        {

          //formatter = new java.text.DecimalFormat(patternStr, dfs);
          formatter = new java.text.DecimalFormat();

          formatter.setDecimalFormatSymbols(dfs);
          formatter.applyLocalizedPattern(patternStr);
        }
      }

      //else
      if (null == formatter)
      {

        // look for a possible default decimal-format
        dfs = ss.getDecimalFormatComposed(new QName(""));

        if (dfs != null)
        {
          formatter = new java.text.DecimalFormat();

          formatter.setDecimalFormatSymbols(dfs);
          formatter.applyLocalizedPattern(patternStr);
        }
        else
        {
          dfs = new java.text.DecimalFormatSymbols(java.util.Locale.US);

          dfs.setInfinity(Constants.ATTRVAL_INFINITY);
          dfs.setNaN(Constants.ATTRVAL_NAN);

          formatter = new java.text.DecimalFormat();

          formatter.setDecimalFormatSymbols(dfs);

          if (null != patternStr)
            formatter.applyLocalizedPattern(patternStr);
        }
      }

      return new XString(formatter.format(num));
    }
    catch (Exception iae)
    {
      templElem.error(XSLTErrorResources.ER_MALFORMED_FORMAT_STRING,
                      new Object[]{ patternStr });

      return XString.EMPTYSTRING;

      //throw new XSLProcessorException(iae);
    }
  }
896982
@SuppressWarnings("unchecked")
    public static <T> T fromByteArrayFst(final byte[] data, final Class<T> clazz,
            final ClassLoader classLoader) {
        if (data == null) {
            return null;
        }
        ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
        if (classLoader != null) {
            Thread.currentThread().setContextClassLoader(classLoader);
        }
        try {
            FSTConfiguration conf = fstConf.get();
            conf.setClassLoader(classLoader != null ? classLoader : oldClassLoader);
            Object result = conf.asObject(data);
            if (result != null && clazz.isAssignableFrom(result.getClass())) {
                return (T) result;
            } else {
                return null;
            }
        } catch (Exception e) {
            throw e instanceof DeserializationException ? (DeserializationException) e
                    : new DeserializationException(e);
        } finally {
            Thread.currentThread().setContextClassLoader(oldClassLoader);
        }
    }
823318
public static String identifier(SourceCode cfml, boolean throwError, boolean allowColon) throws TemplateException {
	int start = cfml.getPos();

	if (!cfml.isCurrentBetween('a', 'z') && !cfml.isCurrent('_')) {
	    if (throwError) throw new TemplateException(cfml, "Invalid Identifier, the following character cannot be part of a identifier [" + cfml.getCurrent() + "]");
	    return null;
	}
	do {
	    cfml.next();
	    if (!(cfml.isCurrentBetween('a', 'z') || cfml.isCurrentBetween('0', '9') || cfml.isCurrent('_') || (allowColon && cfml.isCurrent(':')) || cfml.isCurrent('-'))) {
		break;
	    }
	}
	while (cfml.isValidIndex());
	return cfml.substring(start, cfml.getPos() - start);
    }