Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 293 for unwrap (0.14 sec)

  1. src/test/java/jcifs/smb/SmbTransportImplTest.java

        }
    
        @Test
        @DisplayName("unwrap returns this for compatible types and throws otherwise")
        void unwrapBehavior() {
            // Happy paths
            SmbTransport asIface = transport.unwrap(SmbTransport.class);
            assertSame(transport, asIface);
            SmbTransportInternal asInternal = transport.unwrap(SmbTransportInternal.class);
            assertSame(transport, asInternal);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.6K bytes
    - Viewed (0)
  2. src/test/java/jcifs/CredentialsTest.java

            assertDoesNotThrow(() -> {
                mockCredentials.unwrap(Credentials.class);
                mockCredentials.getUserDomain();
                mockCredentials.isAnonymous();
                mockCredentials.isGuest();
            });
        }
    
        @Test
        @DisplayName("Should unwrap to correct type")
        void testUnwrap() {
            // Given
            when(mockCredentials.unwrap(Credentials.class)).thenReturn(mockCredentials);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  3. src/main/java/jcifs/SmbSession.java

         */
        Configuration getConfig();
    
        /**
         * Unwraps this session to the specified type, allowing access to implementation-specific functionality.
         *
         * @param <T> the type to unwrap to
         * @param type the class of the type to unwrap to
         * @return session instance with the given type
         */
        <T extends SmbSession> T unwrap(Class<T> type);
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  4. src/test/java/jcifs/SmbTransportTest.java

        @Test
        void testUnwrap() {
            // Arrange
            SmbTransport mockUnwrappedTransport = smbTransport; // Mocking unwrap to return itself for simplicity
            when(smbTransport.unwrap(SmbTransport.class)).thenReturn(mockUnwrappedTransport);
    
            // Act
            SmbTransport result = smbTransport.unwrap(SmbTransport.class);
    
            // Assert
            assertNotNull(result, "Unwrapped transport should not be null");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3K bytes
    - Viewed (0)
  5. src/main/java/jcifs/SmbTransport.java

         */
        CIFSContext getContext();
    
        /**
         * Unwraps the transport to the specified type.
         *
         * @param <T> the type to unwrap to
         * @param type the class of the transport type to unwrap
         * @return transport instance with the given type
         */
        <T extends SmbTransport> T unwrap(Class<T> type);
    
        /**
         *
         * {@inheritDoc}
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/primitives/PrimitivesTest.java

      public void testWrap() {
        assertThat(Primitives.wrap(int.class)).isSameInstanceAs(Integer.class);
        assertThat(Primitives.wrap(Integer.class)).isSameInstanceAs(Integer.class);
        assertThat(Primitives.wrap(String.class)).isSameInstanceAs(String.class);
      }
    
      public void testUnwrap() {
        assertThat(Primitives.unwrap(Integer.class)).isSameInstanceAs(int.class);
        assertThat(Primitives.unwrap(int.class)).isSameInstanceAs(int.class);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/primitives/Primitives.java

       * returns {@code type} itself. Idempotent.
       *
       * <pre>
       *     unwrap(Integer.class) == int.class
       *     unwrap(int.class) == int.class
       *     unwrap(String.class) == String.class
       * </pre>
       */
      public static <T> Class<T> unwrap(Class<T> type) {
        checkNotNull(type);
    
        // cast is safe: long.class and Long.class are both of type Class<Long>
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 28 01:26:26 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  8. src/main/java/jcifs/Address.java

     *
     * @author mbechler
     *
     */
    public interface Address {
    
        /**
         * Unwrap the address to a specific type
         *
         * @param <T> the type to unwrap to
         * @param type the target type to unwrap to
         * @return instance for type, null if the type cannot be unwrapped
         */
        <T extends Address> T unwrap(Class<T> type);
    
        /**
         * Gets the host name of this address.
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 2.2K bytes
    - Viewed (0)
  9. src/main/java/jcifs/Credentials.java

     * @author mbechler
     *
     */
    public interface Credentials {
    
        /**
         * Unwrap credentials to a specific type.
         *
         * @param <T> the credential type to unwrap to
         * @param type the class of the credential type to unwrap to
         * @return instance for type, null if the type cannot be unwrapped
         */
        <T extends Credentials> T unwrap(Class<T> type);
    
        /**
         * Get the domain of the user account.
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 1.6K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/SmbTransportPoolImplTest.java

            when(mockTransport.unwrap(SmbTransportInternal.class)).thenReturn(internal);
            when(internal.getSmbSession(eq(ctx), eq("server.test"), isNull())).thenReturn(session);
            when(session.unwrap(SmbSessionInternal.class)).thenReturn(session);
            when(session.getSmbTree(eq("IPC$"), isNull())).thenReturn(tree);
            when(tree.unwrap(SmbTreeInternal.class)).thenReturn(tree);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 19.2K bytes
    - Viewed (0)
Back to top