Java Object Type Case cast(Object object, Class targetClass)

Here you can find the source of cast(Object object, Class targetClass)

  1. HOME
  2. Java
  3. O
  4. Object Type Case
  5. cast(Object object, Class targetClass)

Description

cast

License

Open Source License

Declaration

public static <A> A cast(Object object, Class<A> targetClass) 

Method Source Code

//package com.java2s;
/*/* w  ww. j a va2  s.c  o m*/
(C) 2007 Stefan Reich (jazz@drjava.de)
This source file is part of Project Prophecy.
For up-to-date information, see http://www.drjava.de/prophecy
    
This source file is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, version 2.1.
*/

public class Main {
    public static <A> A cast(Object object, Class<A> targetClass) {
        return targetClass.cast(object);
    }
}

Related

  1. cast(Object o, Class klass)
  2. cast(Object o, String clazz)
  3. cast(Object obj, Class clazz)
  4. cast(Object obj, Class type)
  5. cast(Object object)
  6. cast(Object source)
  7. cast(Object val, Class type)
  8. cast(Object value, String sqlType)
  9. cast(Object x)

HOME | Copyright © www.java2s.com 2016