org.thymeleaf.Arguments.getConfiguration()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(13.1k)|赞(0)|评价(0)|浏览(155)

本文整理了Java中org.thymeleaf.Arguments.getConfiguration()方法的一些代码示例,展示了Arguments.getConfiguration()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Arguments.getConfiguration()方法的具体详情如下:
包路径:org.thymeleaf.Arguments
类名称:Arguments
方法名:getConfiguration

Arguments.getConfiguration介绍

[英]Returns the Template Engine configuration being used for processing templates.
[中]返回用于处理模板的模板引擎配置。

代码示例

代码示例来源:origin: stackoverflow.com

void processNode(final Arguments arguments, final boolean processTextNodes, final boolean processCommentNodes) { 
  // some code 
  if (!isPrecomputed()) { 
    precomputeNode(arguments.getConfiguration()); 
  } 

  if (!isSkippable()) { 
      // processing itself 
      ... 

      // move processing to children, but does not happend if node is marked as skippable 
      doAdditionalProcess(executionArguments, executionArguments.getProcessTextNodes(), executionArguments.getProcessCommentNodes()); 
  } 
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

/**
 * @deprecated since 2.1.0. Deprecated in favour of
 *       {@link #parseExpressionSequence(org.thymeleaf.Configuration, org.thymeleaf.context.IProcessingContext, String)}.
 *       Will be removed in 3.0.
 */
@Deprecated
public ExpressionSequence parseExpressionSequence(final Arguments arguments, final String input) {
  return parseExpressionSequence(arguments.getConfiguration(), arguments, input);
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

/**
 * @deprecated since 2.1.0. Deprecated in favour of
 *       {@link #parseEach(org.thymeleaf.Configuration, org.thymeleaf.context.IProcessingContext, String)}.
 *       Will be removed in 3.0.
 */
@Deprecated
public Each parseEach(final Arguments arguments, final String input) {
  return parseEach(arguments.getConfiguration(), arguments, input);
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

/**
 * @deprecated since 2.1.0. Deprecated in favour of
 *       {@link #parseFragmentSelection(org.thymeleaf.Configuration, org.thymeleaf.context.IProcessingContext, String)}.
 *       Will be removed in 3.0.
 */
@Deprecated
public FragmentSelection parseFragmentSelection(final Arguments arguments, final String input) {
  return parseFragmentSelection(arguments.getConfiguration(), arguments, input);
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

/**
 * @deprecated the StandardExpressionProcessor class was deprecated in 2.1.0 for semantic and refactoring reasons.
 *             Should use the equivalent {@link StandardExpressions} instead if you want to obtain
 *             parser instances registered by the standard dialects, or instance your
 *             parser instances using their constructors directly if you are building your own dialect
 *             including these parserss. As for expression execution, this is no longer managed by executor
 *             objects (also deprecated) but by the expressions themselves. Will be removed in 3.0.
 */
@Deprecated
public static AssignationSequence parseAssignationSequence(final Arguments arguments, final String input, final boolean allowParametersWithoutValue) {
  return AssignationUtils.parseAssignationSequence(arguments.getConfiguration(), arguments, input, allowParametersWithoutValue);
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

/**
 * @deprecated the StandardExpressionProcessor class was deprecated in 2.1.0 for semantic and refactoring reasons.
 *             Should use the equivalent {@link StandardExpressions} instead if you want to obtain
 *             parser instances registered by the standard dialects, or instance your
 *             parser instances using their constructors directly if you are building your own dialect
 *             including these parserss. As for expression execution, this is no longer managed by executor
 *             objects (also deprecated) but by the expressions themselves. Will be removed in 3.0.
 */
@Deprecated
public static Each parseEach(final Arguments arguments, final String input) {
  return EachUtils.parseEach(arguments.getConfiguration(), arguments, input);
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

/**
 * @deprecated since 2.1.0. Deprecated in favour of
 *       {@link #parseAssignationSequence(org.thymeleaf.Configuration, org.thymeleaf.context.IProcessingContext, String, boolean)}.
 *       Will be removed in 3.0.
 */
@Deprecated
public AssignationSequence parseAssignationSequence(final Arguments arguments, final String input, final boolean allowParametersWithoutValue) {
  return parseAssignationSequence(arguments.getConfiguration(), arguments, input, allowParametersWithoutValue);
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

/**
 * @deprecated the StandardExpressionProcessor class was deprecated in 2.1.0 for semantic and refactoring reasons.
 *             Should use the equivalent {@link StandardExpressions} instead if you want to obtain
 *             parser instances registered by the standard dialects, or instance your
 *             parser instances using their constructors directly if you are building your own dialect
 *             including these parserss. As for expression execution, this is no longer managed by executor
 *             objects (also deprecated) but by the expressions themselves. Will be removed in 3.0.
 */
@Deprecated
public static ExpressionSequence parseExpressionSequence(final Arguments arguments, final String input) {
  return ExpressionSequenceUtils.parseExpressionSequence(arguments.getConfiguration(), arguments, input);
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

/**
 * @deprecated the StandardExpressionProcessor class was deprecated in 2.1.0 for semantic and refactoring reasons.
 *             Should use the equivalent {@link StandardExpressions} instead if you want to obtain
 *             parser instances registered by the standard dialects, or instance your
 *             parser instances using their constructors directly if you are building your own dialect
 *             including these parserss. As for expression execution, this is no longer managed by executor
 *             objects (also deprecated) but by the expressions themselves. Will be removed in 3.0.
 */
@Deprecated
public static FragmentSelection parseFragmentSelection(final Arguments arguments, final String input) {
  return FragmentSelectionUtils.parseFragmentSelection(arguments.getConfiguration(), arguments, input);
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

/**
 * @deprecated the StandardExpressionProcessor class was deprecated in 2.1.0 for semantic and refactoring reasons.
 *             Should use the equivalent {@link StandardExpressions} instead if you want to obtain
 *             parser instances registered by the standard dialects, or instance your
 *             parser instances using their constructors directly if you are building your own dialect
 *             including these parserss. As for expression execution, this is no longer managed by executor
 *             objects (also deprecated) but by the expressions themselves. Will be removed in 3.0.
 */
@Deprecated
public static Object executeExpression(final Arguments arguments, final Expression expression) {
  Validate.notNull(arguments, "Arguments cannot be null");
  return expression.execute(arguments.getConfiguration(), arguments);
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

/**
 *
 * @deprecated The StandardExpressionExecutor class has been deprecated in 2.1.0. Instead the "execute()" methods
 *             in Expression objects returned by parsers should be used directly.
 */
@Deprecated
public Object executeExpression(final Arguments arguments, final Expression expression) {
  Validate.notNull(arguments, "Arguments cannot be null");
  Validate.notNull(expression, "Expression cannot be null");
  return expression.execute(arguments.getConfiguration(), arguments, StandardExpressionExecutionContext.NORMAL);
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

/**
 * @since 2.0.16
 * @deprecated The StandardExpressionExecutor class has been deprecated in 2.1.0. Instead the "execute()" methods
 *             in Expression objects returned by parsers should be used directly.
 */
@Deprecated
public Object executeExpression(final Arguments arguments, final Expression expression, final StandardExpressionExecutionContext expContext) {
  Validate.notNull(arguments, "Arguments cannot be null");
  Validate.notNull(expression, "Expression cannot be null");
  return expression.execute(arguments.getConfiguration(), arguments, expContext);
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

/**
 * @deprecated since 2.1.0. Deprecated in favour of
 *       {@link #parseExpression(org.thymeleaf.Configuration, org.thymeleaf.context.IProcessingContext, String)}.
 *       Will be removed in 3.0.
 */
@Deprecated
public Expression parseExpression(final Arguments arguments, final String input) {
  Validate.notNull(arguments, "Arguments cannot be null");
  Validate.notNull(input, "Input cannot be null");
  return (Expression) parseExpression(arguments.getConfiguration(), arguments, input, true);
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

/**
 * @deprecated the StandardExpressionProcessor class was deprecated in 2.1.0 for semantic and refactoring reasons.
 *             Should use the equivalent {@link StandardExpressions} instead if you want to obtain
 *             parser instances registered by the standard dialects, or instance your
 *             parser instances using their constructors directly if you are building your own dialect
 *             including these parserss. As for expression execution, this is no longer managed by executor
 *             objects (also deprecated) but by the expressions themselves. Will be removed in 3.0.
 */
@Deprecated
public static Object processExpression(final Arguments arguments, final String input) {
  Validate.notNull(arguments, "Arguments cannot be null");
  final Expression expression = parseExpression(arguments, input);
  return expression.execute(arguments.getConfiguration(), arguments);
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

@Override
protected final Map<String, Object> getNewLocalVariables(
    final Arguments arguments, final Element element, final String attributeName) {
  final String attributeValue = element.getAttributeValue(attributeName);
  final Configuration configuration = arguments.getConfiguration();
  final IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(configuration);
  final IStandardExpression switchExpression = expressionParser.parseExpression(configuration, arguments, attributeValue);
  final Map<String,Object> newVariables = new HashMap<String, Object>(2, 1.0f);
  newVariables.put(SWITCH_VARIABLE_NAME, new SwitchStructure(switchExpression));
  
  return newVariables;
  
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

@Override
protected final String getText(
    final Arguments arguments, final Element element, final String attributeName) {
  final String attributeValue = element.getAttributeValue(attributeName);
  final Configuration configuration = arguments.getConfiguration();
  final IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(configuration);
  final IStandardExpression expression = expressionParser.parseExpression(configuration, arguments, attributeValue);
  final Object result =
      expression.execute(configuration, arguments, StandardExpressionExecutionContext.UNESCAPED_EXPRESSION);
  return (result == null? "" : result.toString());
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

@Override
protected final String getText(
    final Arguments arguments, final Element element, final String attributeName) {
  
  final String attributeValue = element.getAttributeValue(attributeName);
  final Configuration configuration = arguments.getConfiguration();
  final IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(configuration);
  final IStandardExpression expression = expressionParser.parseExpression(configuration, arguments, attributeValue);
  final Object result = expression.execute(configuration, arguments);
  return (result == null? "" : result.toString());
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

@Override
protected String getTargetAttributeValue(
    final Arguments arguments, final Element element, final String attributeName) {
  final String attributeValue = element.getAttributeValue(attributeName);
  final Configuration configuration = arguments.getConfiguration();
  final IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(configuration);
  final IStandardExpression expression = expressionParser.parseExpression(configuration, arguments, attributeValue);
  final Object result = expression.execute(configuration, arguments);
  return (result == null? "" : result.toString());
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

@Override
protected final Object getNewSelectionTarget(
    final Arguments arguments, final Element element, final String attributeName) {
  final String attributeValue = element.getAttributeValue(attributeName);
  final Configuration configuration = arguments.getConfiguration();
  final IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(configuration);
  final IStandardExpression expression = expressionParser.parseExpression(configuration, arguments, attributeValue);
  
  validateSelectionValue(arguments, element, attributeName, attributeValue, expression);
  
  return expression.execute(configuration, arguments);
  
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.thymeleaf.thymeleaf

@Override
protected final boolean isVisible(
    final Arguments arguments, final Element element, final String attributeName) {
  final Configuration configuration = arguments.getConfiguration();
  final IStandardExpressionParser expressionParser = StandardExpressions.getExpressionParser(configuration);
  final String attributeValue = element.getAttributeValue(attributeName);
  final IStandardExpression expression = expressionParser.parseExpression(configuration, arguments, attributeValue);
  final Object value = expression.execute(configuration, arguments);
  return EvaluationUtil.evaluateAsBoolean(value);
  
}

相关文章