#ifndef __X10_UTIL_STRINGBUILDER_H
#define __X10_UTIL_STRINGBUILDER_H

#include <x10rt.h>


#define X10_LANG_OBJECT_H_NODEPS
#include <x10/lang/Object.h>
#undef X10_LANG_OBJECT_H_NODEPS
#define X10_UTIL_BUILDER_H_NODEPS
#include <x10/util/Builder.h>
#undef X10_UTIL_BUILDER_H_NODEPS
namespace x10 { namespace lang { 
class Any;
} } 
namespace x10 { namespace lang { 
class String;
} } 
namespace x10 { namespace util { 
template<class TPMGL(T)> class ArrayList;
} } 
namespace x10 { namespace lang { 
class Char;
} } 
namespace x10 { namespace lang { 
class Int;
} } 
namespace x10 { namespace lang { 
class Boolean;
} } 
namespace x10 { namespace lang { 
class Byte;
} } 
namespace x10 { namespace lang { 
class Short;
} } 
namespace x10 { namespace lang { 
class Long;
} } 
namespace x10 { namespace lang { 
class Float;
} } 
namespace x10 { namespace lang { 
class Double;
} } 
namespace x10 { namespace array { 
template<class TPMGL(T)> class Array;
} } 
namespace x10 { namespace compiler { 
class Pinned;
} } 
namespace x10 { namespace util { 

class StringBuilder : public x10::lang::Object   {
    public:
    RTT_H_DECLS_CLASS
    
    static x10aux::itable_entry _itables[3];
    
    virtual x10aux::itable_entry* _getITables() { return _itables; }
    
    static x10::util::Builder<x10aux::ref<x10::lang::Any>, x10aux::ref<x10::lang::String> >::itable<x10::util::StringBuilder > _itable_0;
    
    static x10::lang::Any::itable<x10::util::StringBuilder > _itable_1;
    
    x10aux::ref<x10::util::ArrayList<x10_char> > FMGL(buf);
    
    void _constructor();
    
    static x10aux::ref<x10::util::StringBuilder> _make();
    
    virtual x10aux::ref<x10::lang::String> toString();
    virtual x10aux::ref<x10::util::Builder<x10aux::ref<x10::lang::Any>, x10aux::ref<x10::lang::String> > >
      add(x10aux::ref<x10::lang::Any> o);
    virtual x10aux::ref<x10::util::StringBuilder> insert(x10_int p,
                                                         x10aux::ref<x10::lang::Any> o);
    virtual x10aux::ref<x10::util::StringBuilder> add(x10_char x);
    virtual x10aux::ref<x10::util::StringBuilder> add(x10_boolean x);
    virtual x10aux::ref<x10::util::StringBuilder> add(x10_byte x);
    virtual x10aux::ref<x10::util::StringBuilder> add(x10_short x);
    virtual x10aux::ref<x10::util::StringBuilder> add(x10_int x);
    virtual x10aux::ref<x10::util::StringBuilder> add(x10_long x);
    virtual x10aux::ref<x10::util::StringBuilder> add(x10_float x);
    virtual x10aux::ref<x10::util::StringBuilder> add(x10_double x);
    virtual x10aux::ref<x10::util::StringBuilder> add(x10aux::ref<x10::lang::String> x);
    virtual x10aux::ref<x10::util::StringBuilder> insert(x10_int p,
                                                         x10_boolean x);
    virtual x10aux::ref<x10::util::StringBuilder> insert(x10_int p,
                                                         x10_byte x);
    virtual x10aux::ref<x10::util::StringBuilder> insert(x10_int p,
                                                         x10_char x);
    virtual x10aux::ref<x10::util::StringBuilder> insert(x10_int p,
                                                         x10_short x);
    virtual x10aux::ref<x10::util::StringBuilder> insert(x10_int p,
                                                         x10_int x);
    virtual x10aux::ref<x10::util::StringBuilder> insert(x10_int p,
                                                         x10_long x);
    virtual x10aux::ref<x10::util::StringBuilder> insert(x10_int p,
                                                         x10_float x);
    virtual x10aux::ref<x10::util::StringBuilder> insert(x10_int p,
                                                         x10_double x);
    virtual x10aux::ref<x10::util::StringBuilder> insert(x10_int p,
                                                         x10aux::ref<x10::lang::String> x);
    virtual x10aux::ref<x10::util::StringBuilder> addString(x10aux::ref<x10::lang::String> s);
    virtual x10aux::ref<x10::util::StringBuilder> insertString(x10_int pos,
                                                               x10aux::ref<x10::lang::String> s);
    virtual x10_int length();
    virtual x10aux::ref<x10::lang::String> result();
    virtual x10aux::ref<x10::util::StringBuilder> x10__util__StringBuilder____x10__util__StringBuilder__this(
      );
    
    // Serialization
    public: static const x10aux::serialization_id_t _serialization_id;
    
    public: virtual x10aux::serialization_id_t _get_serialization_id() {
         return _serialization_id;
    }
    
    public: virtual void _serialize_body(x10aux::serialization_buffer& buf);
    
    public: static x10aux::ref<x10::lang::Reference> _deserializer(x10aux::deserialization_buffer& buf);
    
    public: void _deserialize_body(x10aux::deserialization_buffer& buf);
    
};

} } 
#endif // X10_UTIL_STRINGBUILDER_H

namespace x10 { namespace util { 
class StringBuilder;
} } 

#ifndef X10_UTIL_STRINGBUILDER_H_NODEPS
#define X10_UTIL_STRINGBUILDER_H_NODEPS
#ifndef X10_UTIL_STRINGBUILDER_H_GENERICS
#define X10_UTIL_STRINGBUILDER_H_GENERICS
#endif // X10_UTIL_STRINGBUILDER_H_GENERICS
#endif // __X10_UTIL_STRINGBUILDER_H_NODEPS
