Java Object Create as(Class clazz, I instance)

Here you can find the source of as(Class clazz, I instance)

Description

as

License

LGPL

Declaration

public static <T, I> T as(Class<T> clazz, I instance) 

Method Source Code

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

public class Main {
    public static <T, I> T as(Class<T> clazz, I instance) {
        return clazz.cast(instance);
    }/*  ww  w  . ja  va 2  s.  co m*/
}

Related

  1. as(Class cls, Object o)
  2. as(Class t, Object o)
  3. as(Class targetClass, Object entity)
  4. as(Class type, Object value)