Examples of ValueContext


Examples of com.bacoder.parser.javaproperties.JavaPropertiesParser.ValueContext

  }

  @Override
  public KeyValue adapt(KeyValueContext context) {
    KeyContext keyContext = getChild(context, KeyContext.class);
    ValueContext valueContext = getChild(context, ValueContext.class);
    if (keyContext != null && valueContext != null) {
      KeyValue keyValue = createData(context);
      keyValue.setKey(getAdapter(KeyAdapter.class).adapt(keyContext));
      keyValue.setValue(getAdapter(ValueAdapter.class).adapt(valueContext));
      return keyValue;
View Full Code Here

Examples of com.bacoder.parser.javaproperties.JavaPropertiesParser.ValueContext

  public KeyValue adapt(KeyValueContext context) {
    KeyContext keyContext = getChild(context, KeyContext.class);
    if (keyContext != null) {
      KeyValue keyValue = createNode(context);
      keyValue.setKey(getAdapter(KeyAdapter.class).adapt(keyContext));
      ValueContext valueContext = getChild(context, ValueContext.class);
      if (valueContext == null) {
        Value value = createNode(context, Value.class);
        int endLine = context.getStop().getLine();
        int endColumn =
            context.getStop().getCharPositionInLine() + context.getStop().getText().length() - 1;
View Full Code Here

Examples of com.slmn.antlr.MsonParser.ValueContext

  public void enterDomainValue(@NotNull DomainValueContext ctx) {
    DomainHeaderContext dhctx = (DomainHeaderContext) ctx.getChild(0);
    if (!(ctx.getChild(2) instanceof ValueContext)) {
      return;
    }
    ValueContext vc = (ValueContext) ctx.getChild(2);
    IdContext ic;
    IdArrayContext iac;
    if (vc.getChild(0) instanceof IdContext) {
      ic = (IdContext) vc.getChild(0);
    } else if (vc.getChild(0) instanceof IdArrayContext) {
      iac = (IdArrayContext) vc.getChild(0);
    } else {
      return;
    }
    ids.add(vc.getChild(0).getText());
  }
View Full Code Here

Examples of org.hibernate.validator.internal.engine.ValueContext

  }

  @Test
  public void testGetInitializedValidator() {
    ConstraintDescriptorImpl<?> constraintDescriptor = getConstraintDescriptorForProperty( "s1" );
    ValueContext valueContext = ValueContext.getLocalExecutionContext( new Foo(), null, null );
    valueContext.setDeclaredTypeOfValidatedElement( String.class );

    ConstraintValidator<?, ?> constraintValidator = constraintValidatorManager.getInitializedValidator(
        valueContext,
        constraintDescriptor,
        constraintValidatorFactory
View Full Code Here

Examples of org.hibernate.validator.internal.engine.ValueContext

  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testNullValidatedValueThrowsIllegalArgumentException() {
    ConstraintDescriptorImpl<?> constraintDescriptor = getConstraintDescriptorForProperty( "s1" );
    ValueContext valueContext = ValueContext.getLocalExecutionContext( new Foo(), null, null );
    valueContext.setDeclaredTypeOfValidatedElement( null );

    constraintValidatorManager.getInitializedValidator(
        valueContext,
        constraintDescriptor,
        constraintValidatorFactory
View Full Code Here

Examples of org.hibernate.validator.internal.engine.ValueContext

    );
  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testNullDescriptorThrowsIllegalArgumentException() {
    ValueContext valueContext = ValueContext.getLocalExecutionContext( new Foo(), null, null );
    valueContext.setDeclaredTypeOfValidatedElement( String.class );

    constraintValidatorManager.getInitializedValidator(
        valueContext,
        null,
        constraintValidatorFactory
View Full Code Here

Examples of org.hibernate.validator.internal.engine.ValueContext

  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testNullFactoryThrowsIllegalArgumentException() {
    ConstraintDescriptorImpl<?> constraintDescriptor = getConstraintDescriptorForProperty( "s1" );
    ValueContext valueContext = ValueContext.getLocalExecutionContext( new Foo(), null, null );
    valueContext.setDeclaredTypeOfValidatedElement( String.class );

    constraintValidatorManager.getInitializedValidator(
        valueContext,
        constraintDescriptor,
        null
View Full Code Here

Examples of org.hibernate.validator.internal.engine.ValueContext

  @Test(expectedExceptions = UnexpectedTypeException.class,
      expectedExceptionsMessageRegExp = "HV000030.*")
  public void testUnexpectedTypeException() {
    ConstraintDescriptorImpl<?> constraintDescriptor = getConstraintDescriptorForProperty( "s2" );

    ValueContext valueContext = ValueContext.getLocalExecutionContext(
        new Foo(), null, PathImpl.createPathFromString( "s2" )
    );
    valueContext.setDeclaredTypeOfValidatedElement( Object.class );

    constraintValidatorManager.getInitializedValidator(
        valueContext,
        constraintDescriptor,
        constraintValidatorFactory
View Full Code Here

Examples of org.hibernate.validator.internal.engine.ValueContext

  }

  @Test
  public void testConstraintValidatorInstancesAreCachedPerFactory() {
    ConstraintDescriptorImpl<?> constraintDescriptor = getConstraintDescriptorForProperty( "s1" );
    ValueContext valueContext = ValueContext.getLocalExecutionContext( new Foo(), null, null );
    valueContext.setDeclaredTypeOfValidatedElement( String.class );

    ConstraintValidator<?, ?> constraintValidator1 = constraintValidatorManager.getInitializedValidator(
        valueContext,
        constraintDescriptor,
        constraintValidatorFactory
View Full Code Here

Examples of org.hibernate.validator.internal.engine.ValueContext

  }

  @Test
  public void testOnlyTheInstancesForTheLeastRecentlyUsedCustomFactoryAreCached() {
    ConstraintDescriptorImpl<?> constraintDescriptor = getConstraintDescriptorForProperty( "s1" );
    ValueContext valueContext = ValueContext.getLocalExecutionContext( new Foo(), null, null );
    valueContext.setDeclaredTypeOfValidatedElement( String.class );

    for ( int i = 0; i < 10; i++ ) {
      constraintValidatorManager.getInitializedValidator(
          valueContext,
          constraintDescriptor,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.