Package software.amazon.awscdk.core
Class ValidationResult
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.core.ValidationResult
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:29:55.161Z")
@Stability(Stable)
public class ValidationResult
extends software.amazon.jsii.JsiiObject
Representation of validation results.
Models a tree of validation errors so that we have as much information as possible about the failure that occurred.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.core.*;
ValidationResults validationResults;
ValidationResult validationResult = new ValidationResult("errorMessage", validationResults);
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionValidationResult(String errorMessage) ValidationResult(String errorMessage, ValidationResults results) protectedValidationResult(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedValidationResult(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionvoidTurn a failed validation into an exception.Return a string rendering of the tree of validation failures.Wrap this result with an error message, if it concerns an error.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
ValidationResult
protected ValidationResult(software.amazon.jsii.JsiiObjectRef objRef) -
ValidationResult
protected ValidationResult(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
ValidationResult
@Stability(Stable) public ValidationResult(@Nullable String errorMessage, @Nullable ValidationResults results) - Parameters:
errorMessage-results-
-
ValidationResult
- Parameters:
errorMessage-
-
ValidationResult
@Stability(Stable) public ValidationResult()
-
-
Method Details
-
assertSuccess
@Stability(Stable) public void assertSuccess()Turn a failed validation into an exception. -
errorTree
Return a string rendering of the tree of validation failures. -
prefix
Wrap this result with an error message, if it concerns an error.- Parameters:
message- This parameter is required.
-
getErrorMessage
-
getIsSuccess
-
getResults
-