def create_annotation(in_prefix, in_method):
    """
    Annotation für GObject-Introspection erzeugen:
    """
        
    result = ""
    
    lines = []
    lines.append("/**")
    
    line = "* %s_%s:" % (in_prefix, in_method.name)
    lines.append(line)
    lines.append("*")
    
    params = [_ParamInfo.create(p) for p in in_method.params]
    
    if in_method.scope == INSTANCE:
        info = IntrospectionInfo()
        info.category = ParamCategory.IN
        info.transfer_mode = TransferMode.NONE
        params.insert(0, _ParamInfo("self", info))
        
    if params:
        for param in params:
            line = "* @%s:" % param.name
            hlp = param.info_string()
            if hlp:
                line += " %s:" % hlp
            hlp = param.description()
            if hlp:
                line += " " + hlp
            lines.append(line)
        lines.append("*")
    
    if in_method.resultType != "void":
        line = "* Return value:"
        result_param = _ParamInfo.create(in_method.result)
        hlp = result_param.info_string()
        if hlp:
            line += " %s:" % hlp
        hlp = result_param.description()
        if hlp:
            line += " " + hlp
        lines.append(line)
        lines.append("*")
    
    lines.append("*/")
    
    for line in lines:
        if result:
            result += "\n"
        result += line
        
    return result
 def _create_default_info(in_param):
     
     result = IntrospectionInfo(in_param)
     
     if _ParamInfo._REGEX_IN_PARAM.match(in_param.name):
         result.category = ParamCategory.IN
     elif _ParamInfo._REGEX_OUT_PARAM.match(in_param.name):
         result.category = ParamCategory.OUT
     elif _ParamInfo._REGEX_INOUT_PARAM.match(in_param.name):
         result.category = ParamCategory.INOUT
         
     return result