# US 11,113,033 B1 · Dynamic validation framework extension

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,113,033 B1
- Document ID: US11113033B1
- Status: Granted
- Kind: B1
- Application number: 16/809,025
- Filed: 2020-03-04
- Published: 2021-09-09
- Granted: 2021-09-07
- Earliest claimed: 2020-03-04
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Pavel Bzoch
- Web page: https://patentgrep.com/patent/US11113033B1

## CPC

- G06F 8/315: {Object-oriented languages}
- G06F 8/433: {Dependency analysis; Data or control flow analysis}
- G06F 8/24: {Object-oriented}
- G06F 11/3612: {by runtime analysis (performance monitoring G06F11/3466)}
- G06F 11/3624: {by performing operations on the source code, e.g. via a compiler}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A programming language framework may be enhanced to provide for dynamic validation. Dynamic validation allows the validator function for any variable to be selected at runtime rather than statically declared at programming-time. Instead of annotating a variable with an annotation that refers to a specific validator function or constraint type, programmers can annotate a variable with an annotation that indicates that the validator function will be selected dynamically at runtime. When a runtime instance of the variable is created, the programming language framework may identify the dynamic validation annotation on the variable, and then use the runtime values in the variable to determine which validator function(s) should be used.

## Claims

### Claim 1

A non-transitory computer-readable medium comprising instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising:
receiving, at a programming language framework, an instance of an object, wherein a definition of the object is annotated with a constraint;
receiving, at the programming language framework, one or more validators that are annotated with an annotation that identifies an attribute in the definition of the object and a value for the attribute, wherein the programming language framework comprises a definition of an abstract class from which each of the one or more validators is inherited, and the abstract class comprises a protected function that validates an object against custom constraints;
identifying, at the programming language framework, a validator in the one or more validators for which a value of the attribute in the instance of the object matches the value for the attribute in the annotation of the validator; and
executing the validator using the instance of the object.

### Claim 2 (depends on 1)

The non-transitory computer-readable medium of claim 1, wherein the validator validates a value of an additional attribute in the definition of the object.

### Claim 3 (depends on 1)

The non-transitory computer-readable medium of claim 1, wherein the one or more validators comprises of an additional validator for which the value of the attribute in the instance of the object does not match the value for the attribute in the annotation of the additional validator.

### Claim 4 (depends on 1)

The non-transitory computer-readable medium of claim 1, wherein the constraint with which the definition of the object is annotated causes the programming language framework to use dynamic validation rather than static validation.

### Claim 5 (depends on 4)

The non-transitory computer-readable medium of claim 4, wherein the programming language framework comprises a definition for the constraint with which the definition of the object is annotated, wherein the definition for the constraint specifies that the constraint may be executed on object type targets.

### Claim 6 (depends on 1)

The non-transitory computer-readable medium of claim 1, wherein the programming language framework comprises a definition for the annotation with which the one or more validators are annotated, wherein the definition comprises an attribute name and an attribute value pattern.

### Claim 7 (depends on 1)

The non-transitory computer-readable medium of claim 1, wherein the abstract class comprises an abstract function that determines if a constraint is valid for an object.

### Claim 8 (depends on 1)

The non-transitory computer-readable medium of claim 1, wherein the programming language framework comprises a definition of a class that scans a class path and identifies each of the one or more validators in the class path.

### Claim 9 (depends on 8)

The non-transitory computer-readable medium of claim 8, wherein the definition of the class includes a function that filters out ones of the one or more validators for which the value of the attribute in the instance of the object does not match the values for the attributes in the annotations of the ones of the one or more validators.

### Claim 10 (depends on 8)

The non-transitory computer-readable medium of claim 8, wherein the programming language framework creates an instance based on the definition of the class as an entry point for dynamic validation when receiving the instance of the object.

### Claim 11 (depends on 8)

The non-transitory computer-readable medium of claim 8, wherein the definition of the class first executes any static validations before executing any dynamic validations.

### Claim 12 (depends on 1)

The non-transitory computer-readable medium of claim 1, wherein the instance of the object comprises the attribute and an additional attribute.

### Claim 13 (depends on 12)

The non-transitory computer-readable medium of claim 12, wherein the attribute determines which of the one or more validators should be used to validate a value assigned to the additional attribute.

### Claim 14 (depends on 13)

The non-transitory computer-readable medium of claim 13, wherein the attribute comprises a key and the second additional attribute comprises a value in a key-value pair.

### Claim 15 (depends on 14)

The non-transitory computer-readable medium of claim 14, wherein the key indicates a datatype of the value.

### Claim 16 (depends on 1)

The non-transitory computer-readable medium of claim 1, wherein:
the validator is annotated with an additional annotation that identifies an additional attribute in the definition of the object and an additional value for the additional attribute; and
a value of a second additional attribute in the instance of the object matches the second additional value for the additional attribute in the additional annotation of the validator.

### Claim 17

A system comprising:
one or more processors; and
one or more memory devices comprising instructions that, when executed by the one or more processors, cause the one or more processors to perform operations comprising:
receiving, at a programming language framework, an instance of an object,
wherein a definition of the object is annotated with a constraint;
receiving, at the programming language framework, one or more validators that are annotated with an annotation that identifies an attribute in the definition of the object and a value for the attribute, wherein the programming language framework comprises a definition of an abstract class from which each of the one or more validators is inherited, and the abstract class comprises a protected function that validates an object against custom constraints;
identifying, at the programming language framework, a validator in the one or more validators for which a value of the attribute in the instance of the object matches the value for the attribute in the annotation of the validator; and
executing the validator using the instance of the object.

### Claim 18

A method of executing dynamic validation in programming language frameworks, the method comprising:
receiving, at a programming language framework, an instance of an object, wherein a definition of the object is annotated with a constraint;
receiving, at the programming language framework, one or more validators that are annotated with an annotation that identifies an attribute in the definition of the object and a value for the attribute, wherein the programming language framework comprises a definition of an abstract class from which each of the one or more validators is inherited, and the abstract class comprises a protected function that validates an object against custom constraints;
identifying, at the programming language framework, a validator in the one or more validators for which a value of the attribute in the instance of the object matches the value for the attribute in the annotation of the validator; and
executing the validator using the instance of the object.
