diff --git a/generator/java_code_files/JavaCodeFile.py b/generator/java_code_files/JavaCodeFile.py index b72c1921..9a6cb6e5 100644 --- a/generator/java_code_files/JavaCodeFile.py +++ b/generator/java_code_files/JavaCodeFile.py @@ -292,6 +292,7 @@ def write_attribute_functions(self): # self.write_function_implementation(code) self.write_function_java(code) + # TODO enum as string? # code = attrib_functions.write_get_string_for_enum(True, i) # self.write_function_implementation(code) diff --git a/generator/java_code_files/java_functions/SetGetFunctions.py b/generator/java_code_files/java_functions/SetGetFunctions.py index 5d2bbb75..7aff9e53 100644 --- a/generator/java_code_files/java_functions/SetGetFunctions.py +++ b/generator/java_code_files/java_functions/SetGetFunctions.py @@ -727,7 +727,7 @@ def write_is_set(self, is_attribute, index): # 'this {1}\'s \"{2}\" {3} is set.' \ # .format(self.true, self.object_name, attribute['name'], # ob_type) - title_line = '@return ' + # title_line = '@return ' if not self.is_java_api: params.append('@param {0} the {1} structure.' .format(self.abbrev_parent, self.object_name)) @@ -737,10 +737,10 @@ def write_is_set(self, is_attribute, index): .format(self.true, self.object_name, attribute['name'], ob_type, self.false)) - - - - + title_line = '' + params.append('Returns whether {{@link {0}}} is set.'.format(attribute['name'])) + params.append(' ') + params.append('@return whether {{@link {0}}} is set.'.format(attribute['name'])) # create the function declaration if self.is_java_api: if 'isVector' in attribute and attribute['isVector']: @@ -771,16 +771,18 @@ def write_is_set(self, is_attribute, index): # create the function implementation if self.is_java_api: if query.is_string(attribute): - implementation = ['return {0} != null'.format( + implementation = ['return this.{0} != null'.format( attribute['name'])] # USED elif attribute['attType'] == 'enum' or attribute['isArray']: - implementation = ['return ({0} != ' - '{1})'.format(attribute['name'], - attribute['default'])] + # implementation = ['return ({0} != ' + # '{1})'.format(attribute['name'], + # attribute['default'])] + implementation = ['return this.{0} != null'.format( + attribute['name'])] # Used elif query.has_is_set_member(attribute): # implementation = ['return ' # 'mIsSet{0}'.format(attribute['capAttName'])] - implementation = ['return {0} != null'.format( + implementation = ['return this.{0} != null'.format( attribute['name'])] # Used elif attribute['type'] == 'element': implementation = ['return ({0} != ' @@ -791,7 +793,7 @@ def write_is_set(self, is_attribute, index): '> 0'.format(attribute['name'])] else: - implementation = ['return {0} != null'.format( + implementation = ['return this.{0} != null'.format( attribute['name'])] # USED else: if not self.is_list_of: