Java Object Type Case cast(Object o, String clazz)

Here you can find the source of cast(Object o, String clazz)

Description

cast

License

Apache License

Declaration

public static <T> T cast(Object o, String clazz) throws ClassNotFoundException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static <T> T cast(Object o, String clazz) throws ClassNotFoundException {
        return (T) Class.forName(clazz).cast(o);
    }/*w w w  . j  a  va  2 s  .  c  om*/
}

Related

  1. cast(long value)
  2. cast(Object inValue)
  3. cast(Object o)
  4. cast(Object o, Class clazz)
  5. cast(Object o, Class klass)
  6. cast(Object obj, Class clazz)
  7. cast(Object obj, Class type)
  8. cast(Object object)
  9. cast(Object object, Class targetClass)