Subversion Repository Public Repository

litesoft

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package org.litesoft.rest.utils;

/**
 * Class to centralize all unchecked warnings.
 */
public class Unchecked
{
    /**
     * Method to centralize all unchecked warnings.
     *
     * @param pType     Used to make the compiler happy about the "type" of T for the Casting
     * @param pInstance What to cast as a T
     *
     * @return pInstance casted as a T
     */
    @SuppressWarnings({"unchecked", "UnusedDeclaration"})
    public static <T> T cast( Class<T> pType, Object pInstance )
    {
        return (T) pInstance;
    }
}

Commits for litesoft/trunk/Java/Rest/RestfulDTOs/DTOsupport/src/org/litesoft/rest/utils/Unchecked.java

Diff revisions: vs.
Revision Author Commited Message
793 GeorgeS picture GeorgeS Sun 12 Aug, 2012 22:56:28 +0000