/* DO NOT EDIT THIS FILE - it is machine generated (JCGO_116) */

#ifdef JCGO_SEPARATED
#define JCGO_116
#include "jcgortl.h"
#include "Main.h"
#endif

#ifdef JCGO_116

#ifdef CHKALL_java_nio_CharBufferImpl
#include "jcgobchk.h"
#endif

JCGO_NOSEP_STATIC java_nio_CharBufferImpl CFASTCALL
java_nio_CharBufferImpl__this__CAIIIIIZ( java_nio_CharBufferImpl This,
 jcharArr buffer, jint offset, jint capacity, jint limit, jint position,
 jint mark, jboolean readOnly )
{
 {
  (java_nio_CharBuffer__this__IIIIL8d4dvCAI((java_nio_CharBuffer)This,
   (java_lang_Object)jnull, buffer, capacity, limit, position, mark,
   offset));
  JCGO_FIELD_NZACCESS(This, readOnly)= (jboolean)readOnly;
 }
 return This;
}

JCGO_NOSEP_INLINE java_nio_CharBufferImpl CFASTCALL
java_nio_CharBufferImpl__new__CAIIIIIZ( jcharArr buffer, jint offset,
 jint capacity, jint limit, jint position, jint mark, jboolean readOnly
 )
{
 return java_nio_CharBufferImpl__this__CAIIIIIZ(
  (java_nio_CharBufferImpl)jcgo_newObject((jvtable)&java_nio_CharBufferImpl_methods),
  buffer, offset, capacity, limit, position, mark, readOnly);
}

JCGO_NOSEP_STATIC java_nio_CharBufferImpl CFASTCALL
java_nio_CharBufferImpl__this__I( java_nio_CharBufferImpl This, jint
 capacity )
{
 {
  (java_nio_CharBufferImpl__this__CAIIIIIZ((java_nio_CharBufferImpl)This,
   (jcharArr)jcgo_newArray(JCGO_CORECLASS_FOR(OBJT_jchar), 0, capacity),
   0, capacity, capacity, 0, (-(jint)1), (jboolean)jfalse));
 }
 return This;
}

JCGO_NOSEP_FRWINL java_nio_CharBufferImpl CFASTCALL
java_nio_CharBufferImpl__new__I( jint capacity )
{
 return java_nio_CharBufferImpl__this__I(
  (java_nio_CharBufferImpl)jcgo_newObject((jvtable)&java_nio_CharBufferImpl_methods),
  capacity);
}

JCGO_NOSEP_FRWINL jboolean CFASTCALL
java_nio_CharBufferImpl__isReadOnly__( java_nio_CharBufferImpl This
 )
{
 {
  return (jboolean)JCGO_FIELD_NZACCESS(This, readOnly);
 }
}

JCGO_NOSEP_STATIC jchar CFASTCALL
java_nio_CharBufferImpl__get__( java_nio_CharBufferImpl This )
{
 {
  if (JCGO_FIELD_NZACCESS(This, pos) >= JCGO_FIELD_NZACCESS(This, limit))
  {
   JCGO_THROW_EXC(java_nio_BufferUnderflowException__new__());
  }
  return JCGO_ARRAY_CACCESS(JCGO_FIELD_NZACCESS(This, backing_buffer),
   (JCGO_FIELD_NZACCESS(This, pos)++) + JCGO_FIELD_NZACCESS(This, array_offset));
 }
}

JCGO_NOSEP_FRWINL java_nio_CharBuffer CFASTCALL
java_nio_CharBufferImpl__put__C( java_nio_CharBufferImpl This, jchar
 value )
{
 {
  if (JCGO_FIELD_NZACCESS(This, readOnly))
  {
   JCGO_THROW_EXC(java_nio_ReadOnlyBufferException__new__());
  }
  if (JCGO_FIELD_NZACCESS(This, pos) >= JCGO_FIELD_NZACCESS(This, limit))
  {
   JCGO_THROW_EXC(java_nio_BufferOverflowException__new__());
  }
  JCGO_ARRAY_CACCESS(JCGO_FIELD_NZACCESS(This, backing_buffer), (JCGO_FIELD_NZACCESS(This,
   pos)++) + JCGO_FIELD_NZACCESS(This, array_offset))= value;
  return (java_nio_CharBuffer)This;
 }
}

JCGO_NOSEP_STATIC jchar CFASTCALL
java_nio_CharBufferImpl__get__I( java_nio_CharBufferImpl This, jint
 index )
{
 {
  (java_nio_Buffer__checkIndex__I(
   (java_nio_Buffer)This, index));
  return JCGO_ARRAY_CACCESS(JCGO_FIELD_NZACCESS(This, backing_buffer),
   index + JCGO_FIELD_NZACCESS(This, array_offset));
 }
}

JCGO_NOSEP_STATIC java_nio_CharBuffer CFASTCALL
java_nio_CharBufferImpl__get__CAII( java_nio_CharBufferImpl This,
 jcharArr dst, jint offset, jint length )
{
 {
  (java_nio_Buffer__checkArraySize__III(
   JCGO_ARRAY_LENGTH(dst), offset, length));
  (java_nio_Buffer__checkForUnderflow__I(
   (java_nio_Buffer)This, length));
  (java_lang_System__arraycopy__LoILoII(
   (java_lang_Object)JCGO_FIELD_NZACCESS(This, backing_buffer), (java_lang_Object)dst,
   JCGO_FIELD_NZACCESS(This, pos) + JCGO_FIELD_NZACCESS(This, array_offset),
   offset, length));
  JCGO_FIELD_NZACCESS(This, pos)+= length;
  return (java_nio_CharBuffer)This;
 }
}

JCGO_NOSEP_STATIC java_nio_CharBuffer CFASTCALL
java_nio_CharBufferImpl__put__CAII( java_nio_CharBufferImpl This,
 jcharArr src, jint offset, jint length )
{
 {
  (java_nio_Buffer__checkArraySize__III(
   JCGO_ARRAY_LENGTH(src), offset, length));
  (java_nio_Buffer__checkForOverflow__I(
   (java_nio_Buffer)This, length));
  (java_lang_System__arraycopy__LoILoII(
   (java_lang_Object)src, (java_lang_Object)JCGO_FIELD_NZACCESS(This,
   backing_buffer), offset, JCGO_FIELD_NZACCESS(This, pos) + JCGO_FIELD_NZACCESS(This,
   array_offset), length));
  JCGO_FIELD_NZACCESS(This, pos)+= length;
  return (java_nio_CharBuffer)This;
 }
}

JCGO_NOSEP_DATA CONST struct java_nio_CharBufferImpl_methods_s java_nio_CharBufferImpl_methods=
{
 JCGO_CLASSREF_OF(java_nio_CharBufferImpl__class),
 JCGO_GCJDESCR_INIT(java_nio_CharBufferImpl_s, backing_buffer)
 OBJT_java_nio_CharBufferImpl,
 (JCGO_OBJSIZE_T)sizeof(struct java_nio_CharBufferImpl_s),
 NULL,
 JCGO_CLINIT_INIT(0)
 0,
 java_nio_CharBuffer__equals__Lo,
 java_nio_CharBuffer__hashCode__,
 java_nio_CharBuffer__toString__,
 java_lang_Object__finalize__,
 java_nio_CharBufferImpl__isReadOnly__
};

JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_nio_CharBufferImpl_class_s
 java_nio_CharBufferImpl__class JCGO_THRD_ATTRNONGC=
{
 {
  &java_lang_Class_methods,
  JCGO_MON_INIT
  JCGO_OBJREF_OF(*(java_lang_Object)&java_nio_CharBufferImpl_methods),
  JCGO_STRREF_OF(jcgo_string1_ChrBffIm),
  JCGO_CLASSREF_OF(java_nio_CharBuffer__class),
  ((jObjectArr)JCGO_OBJREF_OF(jcgo_array3_Object)),
  0x10
 }
};

JCGO_NOSEP_DATA JCGO_NOTHR_CONST struct java_lang_String_s jcgo_string1_ChrBffIm
 JCGO_THRD_ATTRNONGC=
{
 &java_lang_String_methods,
 JCGO_MON_INIT
 (java_lang_Object)JCGO_OBJREF_OF(jcgo_array2_CharBffr),
 0, 23, (jint)0xdb8774fcL
};

#ifdef CHKALL_java_nio_CharBufferImpl
#include "jcgochke.h"
#endif

#endif
