Java Reflection Primitive addPrimitiveToWrapperRelation(Class primitiveClass, Class wrapperClass)

Here you can find the source of addPrimitiveToWrapperRelation(Class primitiveClass, Class wrapperClass)

Description

add Primitive To Wrapper Relation

License

Open Source License

Declaration

private static void addPrimitiveToWrapperRelation(Class primitiveClass, Class wrapperClass) 

Method Source Code

//package com.java2s;
/*//from  w  w  w  .  j ava  2  s .c om
 * Bristleback Websocket Framework - Copyright (c) 2010-2013 http://bristleback.pl
 * ---------------------------------------------------------------------------
 * This program 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; either version 3 of the License, or (at your
 * option) any later version.
 * This library is distributed in the hope that it will be useful,
 * but without any warranty; without even the implied warranty of merchantability
 * or fitness for a particular purpose.
 * You should have received a copy of the GNU Lesser General Public License along
 * with this program; if not, see <http://www.gnu.org/licenses/lgpl.html>.
 * ---------------------------------------------------------------------------
 */

import java.util.HashMap;

import java.util.Map;

public class Main {
    private static final Map<Class, Class> PRIMITIVE_TO_WRAPPERS_MAP = new HashMap<Class, Class>();
    private static final Map<Class, Class> WRAPPERS_TO_PRIMITIVE_MAP = new HashMap<Class, Class>();

    private static void addPrimitiveToWrapperRelation(Class primitiveClass, Class wrapperClass) {
        PRIMITIVE_TO_WRAPPERS_MAP.put(primitiveClass, wrapperClass);
        WRAPPERS_TO_PRIMITIVE_MAP.put(wrapperClass, primitiveClass);
    }
}

Related

  1. calculateDistancePrimitive(Class a, Class b)
  2. canCoerceLiteralNumberExpr(Class type)
  3. castToPrimitive(Object start, Class prim)
  4. convertPrimitiveToObjectClass(Class clazz)