Java Object Type Case castObject(Class clazz, Object object)

Here you can find the source of castObject(Class clazz, Object object)

Description

cast Object

License

Open Source License

Declaration

public static <T> T castObject(Class<T> clazz, Object object) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static <T> T castObject(Class<T> clazz, Object object) {
        return clazz.cast(object);
    }//from w ww. j  a  va  2  s.  co m
}

Related

  1. castInttoLong(int x)
  2. castNode(Class jsonNode, Class classz)
  3. castNonNullArray( T [] arr)
  4. castNullableParameterTo(String parameterName, T value, Class requiredType)
  5. castNumber(Number num, Class clazz)
  6. castObject(Object fromObj, Class toClass)
  7. castObject(Object ob)
  8. castOrDefault(Class type, Object value, T defaultValue, boolean allowNull)
  9. castOrDefault(Object o, Class type, T def)