# This file was automatically generated by SWIG
package Java::Wrapper;
require Exporter;
require DynaLoader;
@ISA = qw(Exporter DynaLoader);
package Java::Wrapperc;
bootstrap Java::Wrapper;
package Java::Wrapper;
@EXPORT = qw( );

# ---------- BASE METHODS -------------

package Java::Wrapper;

sub TIEHASH {
    my ($classname,$obj) = @_;
    return bless $obj, $classname;
}

sub CLEAR { }

sub FIRSTKEY { }

sub NEXTKEY { }

sub FETCH {
    my ($self,$field) = @_;
    my $member_func = "swig_${field}_get";
    $self->$member_func();
}

sub STORE {
    my ($self,$field,$newval) = @_;
    my $member_func = "swig_${field}_set";
    $self->$member_func($newval);
}

sub this {
    my $ptr = shift;
    return tied(%$ptr);
}


# ------- FUNCTION WRAPPERS --------

package Java::Wrapper;


############# Class : Java::Wrapper::ArgumentArray ##############

package Java::Wrapper::ArgumentArray;
@ISA = qw( Java::Wrapper );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = Java::Wrapperc::new_ArgumentArray(@_);
    bless $self, $pkg if defined($self);
}

*addElement = *Java::Wrapperc::ArgumentArray_addElement;
*getSize = *Java::Wrapperc::ArgumentArray_getSize;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        Java::Wrapperc::delete_ArgumentArray($self);
        delete $OWNER{$self};
    }
}

sub DISOWN {
    my $self = shift;
    my $ptr = tied(%$self);
    delete $OWNER{$ptr};
}

sub ACQUIRE {
    my $self = shift;
    my $ptr = tied(%$self);
    $OWNER{$ptr} = 1;
}


############# Class : Java::Wrapper::ObjectWrapper ##############

package Java::Wrapper::ObjectWrapper;
@ISA = qw( Java::Wrapper );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = Java::Wrapperc::new_ObjectWrapper(@_);
    bless $self, $pkg if defined($self);
}

*perl_isa = *Java::Wrapperc::ObjectWrapper_perl_isa;
*can = *Java::Wrapperc::ObjectWrapper_can;
*toString = *Java::Wrapperc::ObjectWrapper_toString;
*isArray = *Java::Wrapperc::ObjectWrapper_isArray;
*invokeMethod = *Java::Wrapperc::ObjectWrapper_invokeMethod;
*getLastThrownException = *Java::Wrapperc::ObjectWrapper_getLastThrownException;
*getField = *Java::Wrapperc::ObjectWrapper_getField;
*setField = *Java::Wrapperc::ObjectWrapper_setField;
*getLastStaticThrownException = *Java::Wrapperc::ObjectWrapper_getLastStaticThrownException;
*newClassInstance = *Java::Wrapperc::ObjectWrapper_newClassInstance;
*invokeStaticMethod = *Java::Wrapperc::ObjectWrapper_invokeStaticMethod;
*newJavaArray = *Java::Wrapperc::ObjectWrapper_newJavaArray;
*wrapInt = *Java::Wrapperc::ObjectWrapper_wrapInt;
*wrapString = *Java::Wrapperc::ObjectWrapper_wrapString;
*wrapBoolean = *Java::Wrapperc::ObjectWrapper_wrapBoolean;
*wrapShort = *Java::Wrapperc::ObjectWrapper_wrapShort;
*wrapLong = *Java::Wrapperc::ObjectWrapper_wrapLong;
*wrapFloat = *Java::Wrapperc::ObjectWrapper_wrapFloat;
*wrapDouble = *Java::Wrapperc::ObjectWrapper_wrapDouble;
*wrapByte = *Java::Wrapperc::ObjectWrapper_wrapByte;
*wrapChar = *Java::Wrapperc::ObjectWrapper_wrapChar;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        Java::Wrapperc::delete_ObjectWrapper($self);
        delete $OWNER{$self};
    }
}

sub DISOWN {
    my $self = shift;
    my $ptr = tied(%$self);
    delete $OWNER{$ptr};
}

sub ACQUIRE {
    my $self = shift;
    my $ptr = tied(%$self);
    $OWNER{$ptr} = 1;
}


############# Class : Java::Wrapper::ArrayWrapper ##############

package Java::Wrapper::ArrayWrapper;
@ISA = qw( Java::Wrapper Java::Wrapper::ObjectWrapper );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = Java::Wrapperc::new_ArrayWrapper(@_);
    bless $self, $pkg if defined($self);
}

*getSize = *Java::Wrapperc::ArrayWrapper_getSize;
*set = *Java::Wrapperc::ArrayWrapper_set;
*get = *Java::Wrapperc::ArrayWrapper_get;
*toString = *Java::Wrapperc::ArrayWrapper_toString;
*getObjectAsArray = *Java::Wrapperc::ArrayWrapper_getObjectAsArray;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        Java::Wrapperc::delete_ArrayWrapper($self);
        delete $OWNER{$self};
    }
}

sub DISOWN {
    my $self = shift;
    my $ptr = tied(%$self);
    delete $OWNER{$ptr};
}

sub ACQUIRE {
    my $self = shift;
    my $ptr = tied(%$self);
    $OWNER{$ptr} = 1;
}


# ------- VARIABLE STUBS --------

package Java::Wrapper;

1;
