Commit be657832 authored by Ryan Berkheimer's avatar Ryan Berkheimer

update boolean to Boolean in Interface methods available to C/C++, update...

update boolean to Boolean in Interface methods available to C/C++, update signature strings in C/C++ api refs. This is to maintain uniformity (Bool chosen over bool)
parent 996b9ff0
Pipeline #5770 failed with stages
in 0 seconds
......@@ -30,7 +30,8 @@
"constructor": {"native-library": "/Users/rberkheimer/projects/asos/ingest/libraries/messageapi/lib/test/native/demoendpointlibrary/libDemoEndpointLibrary.jnilib",
"default-fields": [{"id": "test-integer",
"type": "integer",
"required": false},
"required": false,
"value": 5},
{"id": "return-list",
"type": "list(string)",
"required": false}],
......
......@@ -240,11 +240,11 @@ const char *FieldUtils::getMethodSignature(const char *methodName)
}
else if (strcmp(methodName, "isValid") == 0)
{
return "()Z";
return "()Ljava/lang/Boolean;";
}
else if (strcmp(methodName, "isRequired") == 0)
{
return "()Z";
return "()Ljava/lang/Boolean;";
}
else if (strcmp(methodName, "setValue") == 0)
{
......
......@@ -192,11 +192,11 @@ const char *RecordUtils::getMethodSignature(const char *methodName)
{
if (strcmp(methodName, "isValid") == 0)
{
return "()Z";
return "()Ljava/lang/Boolean;";
}
else if (strcmp(methodName, "setValid") == 0)
{
return "(Z)V";
return "(Ljava/lang/Boolean;)V";
}
else if (strcmp(methodName, "getCopy") == 0)
......@@ -209,7 +209,7 @@ const char *RecordUtils::getMethodSignature(const char *methodName)
}
else if (strcmp(methodName, "hasField") == 0)
{
return "(Ljava/lang/String;)Z";
return "(Ljava/lang/String;)Ljava/lang/Boolean;";
}
else if (strcmp(methodName, "getFields") == 0)
{
......@@ -225,7 +225,7 @@ const char *RecordUtils::getMethodSignature(const char *methodName)
}
else if (strcmp(methodName, "hasCondition") == 0)
{
return "(Ljava/lang/String;)Z";
return "(Ljava/lang/String;)Ljava/lang/Boolean;";
}
else if (strcmp(methodName, "getConditions") == 0)
{
......
......@@ -114,7 +114,7 @@ const char *ResponseUtils::getMethodSignature(const char *methodName)
{
if (strcmp(methodName, "isComplete") == 0)
{
return "()Z";
return "()Ljava/lang/Boolean;";
}
else if (strcmp(methodName, "getRequest") == 0)
{
......@@ -138,7 +138,7 @@ const char *ResponseUtils::getMethodSignature(const char *methodName)
}
else if (strcmp(methodName, "setComplete") == 0)
{
return "(Z)V";
return "(Ljava/lang/Boolean;)V";
}
return NULL;
}
\ No newline at end of file
......@@ -28,7 +28,7 @@ def 'Session with one endpoint that calls into C, populates a return record, and
record1.setField('null-test', 'null')
record2.setField('string-test', 'cool!')
record2.setField('initial-value', 5000)
record2.setField('null-test', 'null')
//record2.setField('null-test', 'null')
/*for (int i=0; i<500; i++) {
IRecord r = request.createRecord();
r.setField("initial-value", i);
......
......@@ -67,15 +67,15 @@ public class DefaultField implements IField {
return this.type;
}
public boolean isRequired() {
public Boolean isRequired() {
return this.required;
}
public boolean isValid() {
public Boolean isValid() {
return this.valid;
}
public void setValid(boolean valid) {
public void setValid(Boolean valid) {
this.valid = valid;
}
......
......@@ -34,14 +34,14 @@ public interface IField {
* Used contextually to determine whether
* or not this field is required for subsequent processing.
*/
public boolean isRequired();
public Boolean isRequired();
/**
* Used contextually to determine whether or not
* this field is valid. This could be used in type validation
* or some other way.
*/
public boolean isValid();
public Boolean isValid();
/**
* Returns the value of the field.
......@@ -58,7 +58,7 @@ public interface IField {
* Sets true or false whether or not the field is
* valid against some generalized criteria
*/
public void setValid(boolean valid);
public void setValid(Boolean valid);
/**
* Allows setting of the type of the field as a string.
......
......@@ -9,7 +9,7 @@ import java.util.List;
* any processing steps (validation, factoring, transformation, etc.)
* in sequence, eventually yielding a set of returned data packets from
* endpoint connections, where it combines them and sets a response
* list of records, list of rejections, and changes the isComplete boolean
* list of records, list of rejections, and changes the isComplete Boolean
* to true.
* @author Ryan Berkheimer
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment