Java Class Type Check isJavaImmutable(Class cls)

Here you can find the source of isJavaImmutable(Class cls)

Description

Return if the specified Java class represents an immutable type.

License

Academic Free License

Declaration

public static boolean isJavaImmutable(Class cls) 

Method Source Code

//package com.java2s;
// Licensed under the Academic Free License version 3.0

import java.util.*;

public class Main {
    private static HashMap javaImmutables = new HashMap();

    /**/*from ww w  .j av a  2  s . c  om*/
     * Return if the specified Java class represents an immutable type.
     */
    public static boolean isJavaImmutable(Class cls) {
        return javaImmutables.get(cls.getName()) != null;
    }
}

Related

  1. isCollection(Class cls)
  2. isCollectionMapOrArray(Class type)
  3. isComposite(Class cls)
  4. isEmptyCollectionOrMap(Object content, Class type)
  5. isInPrimitiveWrapperType(Class type)
  6. isLogicalPrimitive(Class c)
  7. isMap(Class o)
  8. isMapType(final Class type)
  9. isMethodReturnTypeValid(Class cls)