com.landawn.abacus.util.Clazz Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of abacus-util-all-jdk7 Show documentation
Show all versions of abacus-util-all-jdk7 Show documentation
A general programming library in Java
package com.landawn.abacus.util;
import java.util.ArrayDeque;
import java.util.Collection;
import java.util.Deque;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.NavigableMap;
import java.util.NavigableSet;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Set;
import java.util.SortedMap;
import java.util.SortedSet;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.LinkedBlockingQueue;
/**
* It's designed to provide a convenient way to parameterized the generic type (e.g. {@code List.class}).
*
* But the returned Class by all the methods doesn't have the actual parameterized type informations. For example:
*
*
* List<String> clazz = Clazz.ofList(String.class);
* // clazz doesn't have the actual type parameters information.
* // you won't be able to get type parameter {@code String} by: cls.getTypeParameters();
* // To save the real type parameters: you need to either:
* Type<List<String>> type = Type.of("List<String>"); // or Type.ofList(String.class)
*
* // Or
* Type<List<String>> type = new TypeReference<List<String>>() {}.type();
*
*
*
*
* @author Haiyang Li
*
*/
public final class Clazz {
@SuppressWarnings("rawtypes")
public static final Class
© 2015 - 2025 Weber Informatics LLC | Privacy Policy