(self, data_value)
Convert provided int to language specific literal.
Convert provided int to language specific literal.
Convert provided int to language specific literal .
def _Int(self, data_value):
    """Convert provided int to language specific literal."""
    # Available types can be found in class variables
    code_types = {
        'java.lang.Short': '%s',
        'java.lang.Integer': '%s',
        'java.lang.Long': '%sL',
    }
    try:
      return code_types[data_value.code_type] % long(data_value.value)
    except KeyError:
      raise ValueError(
          ('Provided DataValue (%s) does not present an appropriate Java '
           'annotated code type (%s).') %
          (data_value.value, data_value.code_type))
def _Int ( self , data_value ) : # Available types can be found in class variables code_types = { 'java.lang.Short' : '%s' , 'java.lang.Integer' : '%s' , 'java.lang.Long' : '%sL' , } try : return code_types [ data_value . code_type ] % long ( data_value . value ) except KeyError : raise ValueError ( ( 'Provided DataValue (%s) does not present an appropriate Java ' 'annotated code type (%s).' ) % ( data_value . value , data_value . code_type ) )