Lines Matching refs:accessor
559 def build_template_dictionary(test_class, var_handle_kind, accessor, var_type): argument
563 if accessor.get_number_of_var_type_arguments() != 0 and coordinates != "":
566 'accessor_method' : accessor.method_name,
567 'access_mode' : accessor.access_mode,
581 def emit_accessor_test(var_handle_kind, accessor, var_type, output_path): argument
582 …test_class = var_handle_kind.get_name() + capitalize_first(accessor.method_name) + capitalize_firs…
585 expansions = build_template_dictionary(test_class, var_handle_kind, accessor, var_type)
587 if accessor.access_mode_form == AccessModeForm.GET:
591 elif accessor.access_mode_form == AccessModeForm.SET:
595 elif accessor.access_mode_form == AccessModeForm.STRONG_COMPARE_AND_SET:
606 elif accessor.access_mode_form == AccessModeForm.WEAK_COMPARE_AND_SET:
621 elif accessor.access_mode_form == AccessModeForm.COMPARE_AND_EXCHANGE:
631 elif accessor.access_mode_form == AccessModeForm.GET_AND_SET:
636 elif accessor.access_mode_form == AccessModeForm.GET_AND_UPDATE_BITWISE:
638 expansions['binop'] = accessor.get_java_bitwise_operator()
647 elif accessor.access_mode_form == AccessModeForm.GET_AND_UPDATE_NUMERIC:
649 expansions['binop'] = accessor.get_java_numeric_operator()
660 raise ValueError(accessor.access_mode_form)
662 if var_handle_kind.may_throw_read_only and not accessor.is_read_only():
711 for accessor in VAR_HANDLE_ACCESSORS:
713 emit_accessor_test(var_handle_kind, accessor, var_type, output_path)
722 for accessor in VAR_HANDLE_ACCESSORS:
723 emit_accessor_test(var_handle_kind, accessor, ref_type, output_path)
725 def emit_boxing_value_type_accessor_test(accessor, var_type, output_path): argument
726 test_class = "Boxing" + capitalize_first(accessor.method_name) + capitalize_first(var_type.name)
730 expansions = build_template_dictionary(test_class, var_handle_kind, accessor, var_type)
764 return_type = accessor.get_return_type(var_type)
767 print("vh.{0}(this".format(accessor.method_name), end="", file=body_text)
768 num_args = accessor.get_number_of_var_type_arguments()
773 …(" assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.{0}));".format(accessor.access_mode),
779 …" assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.{0}));".format(accessor.access_mode),
786 def emit_boxing_return_value_type_test(accessor, var_type, output_path): argument
787 …test_class = "BoxingReturn" + capitalize_first(accessor.method_name) + capitalize_first(var_type.n…
791 expansions = build_template_dictionary(test_class, var_handle_kind, accessor, var_type)
820 return_type = accessor.get_return_type(var_type)
827 print("vh.{0}(this".format(accessor.method_name), end="", file=body_text)
828 num_args = accessor.get_number_of_var_type_arguments()
833 …(" assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.{0}));".format(accessor.access_mode),
839 …" assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.{0}));".format(accessor.access_mode),
848 for accessor in VAR_HANDLE_ACCESSORS:
849 if accessor.get_number_of_var_type_arguments() > 0:
850 emit_boxing_value_type_accessor_test(accessor, var_type, output_path)
852 emit_boxing_return_value_type_test(accessor, var_type, output_path)