コード例 #1
0
 /// <summary>Returns an instance of type InitialContext if the given proxy instance
 /// represents a Java object that is type-compatible with javax.naming.InitialContext</summary>
 /// This function returns <c>null</c> if the passed object is not a type-compatible
 /// proxy object.
 /// <param name="proxy">A proxy object of any type.</param>
 public static new global::Javax.Naming.InitialContext From( object proxy )
 {
     global::Codemesh.JuggerNET.JavaProxy   jp = proxy as global::Codemesh.JuggerNET.JavaProxy;
     if (jp != null && _cmj_theClass.IsTypeOf(jp))
         return new global::Javax.Naming.InitialContext(new global::Codemesh.JuggerNET.JNIHandle(jp.JObjectDuplicate));
     else
         return null;
 }
コード例 #2
0
 /// <summary>Casts another proxy object to this type if possible.
 /// <para>You rarely need this method. It is only required when you have for example
 /// an array proxy type that is type compatible on the Java side but not on the .NET side.</para>
 /// <para>A good example would be the <c>String[][]</c> and <c>Object[]</c> types in Java.
 /// The two-dimensional String array IS also a one-dimensional Object array in Java, but we cannot
 /// duplicate this behavior through inheritance in .NET.  For that reason, we provide you with this
 /// method, allowing you to take for exmaple a <c>StringArrayArray</c> object and use it to create
 /// an <c>ObjectArray</c> instance when you need to.</para></summary>
 public static JDBCTypeArray From(global::Codemesh.JuggerNET.JavaProxy proxy)
 {
     if (_cmj_theClass.IsTypeOf(proxy))
     {
         return(new JDBCTypeArray(new global::Codemesh.JuggerNET.JNIHandle(proxy.JObjectDuplicate)));
     }
     else
     {
         return(null);
     }
 }
コード例 #3
0
ファイル: Date.cs プロジェクト: ridomin/HSQLDB.Net
 /// <summary>Returns an instance of type Date if the given proxy instance
 /// represents a Java object that is type-compatible with java.sql.Date</summary>
 /// This function returns <c>null</c> if the passed object is not a type-compatible
 /// proxy object.
 /// <param name="proxy">A proxy object of any type.</param>
 public static new global::Java.Sql.Date From(object proxy)
 {
     global::Codemesh.JuggerNET.JavaProxy jp = proxy as global::Codemesh.JuggerNET.JavaProxy;
     if (jp != null && _cmj_theClass.IsTypeOf(jp))
     {
         return(new global::Java.Sql.Date(new global::Codemesh.JuggerNET.JNIHandle(jp.JObjectDuplicate)));
     }
     else
     {
         return(null);
     }
 }
コード例 #4
0
 /// <summary>Returns an instance of type UnaryOperatorImpl if the given proxy instance
 /// represents a Java object that is type-compatible with java.util.function.UnaryOperator</summary>
 /// <param name="proxy">A proxy object of any type.</param>
 public static new global::Java.Util.Function.UnaryOperatorImpl From(object proxy)
 {
     global::Codemesh.JuggerNET.JavaProxy jp = proxy as global::Codemesh.JuggerNET.JavaProxy;
     if (_cmj_theClass.IsTypeOf(jp))
     {
         return(new global::Java.Util.Function.UnaryOperatorImpl(new global::Codemesh.JuggerNET.JNIHandle(jp.JObjectDuplicate)));
     }
     else
     {
         return(null);
     }
 }
コード例 #5
0
 /// <summary>Returns an instance of type RowSetMetaDataImpl if the given proxy instance
 /// represents a Java object that is type-compatible with javax.sql.RowSetMetaData</summary>
 /// <param name="proxy">A proxy object of any type.</param>
 public static new global::Javax.Sql.RowSetMetaDataImpl From(object proxy)
 {
     global::Codemesh.JuggerNET.JavaProxy jp = proxy as global::Codemesh.JuggerNET.JavaProxy;
     if (_cmj_theClass.IsTypeOf(jp))
     {
         return(new global::Javax.Sql.RowSetMetaDataImpl(new global::Codemesh.JuggerNET.JNIHandle(jp.JObjectDuplicate)));
     }
     else
     {
         return(null);
     }
 }
コード例 #6
0
ファイル: AnnotatedType.cs プロジェクト: ridomin/HSQLDB.Net
 /// <summary>Returns an instance of type AnnotatedTypeImpl if the given proxy instance
 /// represents a Java object that is type-compatible with java.lang.reflect.AnnotatedType</summary>
 /// <param name="proxy">A proxy object of any type.</param>
 public static new global::Java.Lang.Reflect.AnnotatedTypeImpl From(object proxy)
 {
     global::Codemesh.JuggerNET.JavaProxy jp = proxy as global::Codemesh.JuggerNET.JavaProxy;
     if (_cmj_theClass.IsTypeOf(jp))
     {
         return(new global::Java.Lang.Reflect.AnnotatedTypeImpl(new global::Codemesh.JuggerNET.JNIHandle(jp.JObjectDuplicate)));
     }
     else
     {
         return(null);
     }
 }
コード例 #7
0
 /// <summary>Returns an instance of type ResultImpl if the given proxy instance
 /// represents a Java object that is type-compatible with javax.xml.transform.Result</summary>
 /// <param name="proxy">A proxy object of any type.</param>
 public static new global::Javax.Xml.Transform.ResultImpl From(object proxy)
 {
     global::Codemesh.JuggerNET.JavaProxy jp = proxy as global::Codemesh.JuggerNET.JavaProxy;
     if (_cmj_theClass.IsTypeOf(jp))
     {
         return(new global::Javax.Xml.Transform.ResultImpl(new global::Codemesh.JuggerNET.JNIHandle(jp.JObjectDuplicate)));
     }
     else
     {
         return(null);
     }
 }
コード例 #8
0
 /// <summary>Returns an instance of type SQLIntegrityConstraintViolationException if the given proxy instance
 /// represents a Java object that is type-compatible with java.sql.SQLIntegrityConstraintViolationException</summary>
 /// This function returns <c>null</c> if the passed object is not a type-compatible
 /// proxy object.
 /// <param name="proxy">A proxy object of any type.</param>
 public static new global::Java.Sql.SQLIntegrityConstraintViolationException From(object proxy)
 {
     global::Codemesh.JuggerNET.JavaProxy jp = proxy as global::Codemesh.JuggerNET.JavaProxy;
     if (jp != null && _cmj_theClass.IsTypeOf(jp))
     {
         return(new global::Java.Sql.SQLIntegrityConstraintViolationException(new global::Codemesh.JuggerNET.JNIHandle(jp.JObjectDuplicate)));
     }
     else
     {
         return(null);
     }
 }
コード例 #9
0
 /// <summary>Returns an instance of type SQLInvalidAuthorizationSpecException if the given proxy instance
 /// represents a Java object that is type-compatible with java.sql.SQLInvalidAuthorizationSpecException</summary>
 /// This function returns <c>null</c> if the passed object is not a type-compatible
 /// proxy object.
 /// <param name="proxy">A proxy object of any type.</param>
 public static new global::Java.Sql.SQLInvalidAuthorizationSpecException From(object proxy)
 {
     global::Codemesh.JuggerNET.JavaProxy jp = proxy as global::Codemesh.JuggerNET.JavaProxy;
     if (jp != null && _cmj_theClass.IsTypeOf(jp))
     {
         return(new global::Java.Sql.SQLInvalidAuthorizationSpecException(new global::Codemesh.JuggerNET.JNIHandle(jp.JObjectDuplicate)));
     }
     else
     {
         return(null);
     }
 }