// Decompiled by Jad v1.5.7f. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst 
// Source File Name:   JAVA_STRUCT.java
// Class Version:      45.3

package oracle.sql;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Hashtable;
import java.util.Map;
import oracle.jdbc.dbaccess.DBError;
import oracle.jdbc.internal.OracleConnection;

// Referenced classes of package oracle.sql:
//            STRUCT, StructDescriptor

// flag ACC_SUPER is set
public class JAVA_STRUCT extends STRUCT
{
    // Constants:          119
    // Interfaces:         0
    // Fields:             0
    // Methods:            4
    // Class Attributes:   1


    // Decompiling method: <init>  Signature: (Loracle/sql/StructDescriptor;Ljava/sql/Connection;[Ljava/lang/Object;)V
    // Max stack: 4, #locals: 4, #params: 4
    // Code length: 8 bytes, Code offset: 1724
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/JAVA_STRUCT; At 0 8 Range 0 7 Init 0 fixed
    // Parameter  1 added: Name structdescriptor Type Loracle/sql/StructDescriptor; At 0 8 Range 0 7 Init 0
    // Parameter  2 added: Name connection Type Ljava/sql/Connection; At 0 8 Range 0 7 Init 0
    // Parameter  3 added: Name aobj Type [Ljava/lang/Object; At 0 8 Range 0 7 Init 0
    // RetValue   4 added: Name <returnValue> Type V At 0 8 Range 0 7 Init 0 fixed
    public JAVA_STRUCT(StructDescriptor structdescriptor, Connection connection, Object aobj[])
        throws SQLException
    {
        super(structdescriptor, connection, aobj);
        return;
    }

    // Decompiling method: <init>  Signature: (Loracle/sql/StructDescriptor;[BLjava/sql/Connection;)V
    // Max stack: 4, #locals: 4, #params: 4
    // Code length: 8 bytes, Code offset: 1784
    // Line Number Table found: 2 entries
    // Parameter  0 added: Name this Type Loracle/sql/JAVA_STRUCT; At 0 8 Range 0 7 Init 0 fixed
    // Parameter  1 added: Name structdescriptor Type Loracle/sql/StructDescriptor; At 0 8 Range 0 7 Init 0
    // Parameter  2 added: Name abyte0 Type [B At 0 8 Range 0 7 Init 0
    // Parameter  3 added: Name connection Type Ljava/sql/Connection; At 0 8 Range 0 7 Init 0
    // RetValue   4 added: Name <returnValue> Type V At 0 8 Range 0 7 Init 0 fixed
    public JAVA_STRUCT(StructDescriptor structdescriptor, byte abyte0[], Connection connection)
        throws SQLException
    {
        super(structdescriptor, abyte0, connection);
        return;
    }

    // Decompiling method: toJdbc  Signature: ()Ljava/lang/Object;
    // Max stack: 4, #locals: 5, #params: 1
    // Code length: 142 bytes, Code offset: 1844
    // Exception table: 1 entries
    //           start  85 end 90 handler 93 type ClassNotFoundException
    // Line Number Table found: 21 entries
    // Parameter  0 added: Name this Type Loracle/sql/JAVA_STRUCT; At 0 142 Range 0 141 Init 0 fixed
    // RetValue   5 added: Name <returnValue> Type Ljava/lang/Object; At 0 142 Range 0 141 Init 0 fixed
    // LocalVar   1 added: Name map Type Ljava/util/Map; At 12 109 Range 12 120 Init 12
    // LocalVar   2 added: Name obj Type A At 14 120 Range 14 133 Init 14
    // LocalVar   2 chged: Name class1 Oname obj Type Ljava/lang/Class; At 27 107 Range 14 133 Init 14
    // LocalVar   1 chged: Name obj Oname map Type Ljava/lang/Object; At 40 81 Range 12 120 Init 12
    // LocalVar   3 added: Name s Type Ljava/lang/String; At 69 17 Range 69 85 Init 69
    // LocalVar   4 added: Name classnotfoundexception Type Ljava/lang/ClassNotFoundException; At 93 15 Range 93 107 Init 93
    public Object toJdbc()
        throws SQLException
    {
        Object obj = ((OracleConnection)m_conn).getJavaObjectTypeMap();
        Class class1 = null;
        if(obj != null)
        {
            class1 = m_descriptor.getClass(((Map) (obj)));
        } else
        {
            obj = new Hashtable(10);
            ((OracleConnection)m_conn).setJavaObjectTypeMap(((Map) (obj)));
        }
        if(class1 == null)
        {
            String s = StructDescriptor.getJavaObjectClassName(m_conn, getDescriptor());
            if(s == null || s.length() == 0)
            {
                DBError.throwSqlException(1);
            }
            try
            {
                class1 = Class.forName(s);
            }
            catch(ClassNotFoundException classnotfoundexception)
            {
                DBError.throwSqlException(49, "ClassNotFoundException: " + classnotfoundexception.getMessage());
            }
            ((Map) (obj)).put(getSQLTypeName(), class1);
        }
        return toClass(class1, getMap());
    }

    // Decompiling method: toJdbc  Signature: (Ljava/util/Map;)Ljava/lang/Object;
    // Max stack: 1, #locals: 2, #params: 2
    // Code length: 5 bytes, Code offset: 2122
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name this Type Loracle/sql/JAVA_STRUCT; At 0 5 Range 0 4 Init 0 fixed
    // Parameter  1 added: Name map Type Ljava/util/Map; At 0 5 Range 0 4 Init 0
    // RetValue   2 added: Name <returnValue> Type Ljava/lang/Object; At 0 5 Range 0 4 Init 0 fixed
    public Object toJdbc(Map map)
        throws SQLException
    {
        return toJdbc();
    }
}
