ClassInfoFactory.java :  » Net » Terracotta » com » tc » object » bytecode » aspectwerkz » Java Open Source

Java Open Source » Net » Terracotta 
Terracotta » com » tc » object » bytecode » aspectwerkz » ClassInfoFactory.java
/*
 * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice.  All rights reserved.
 */
package com.tc.object.bytecode.aspectwerkz;

import com.tc.aspectwerkz.reflect.ClassInfo;

import java.util.HashMap;
import java.util.Map;

/**
 *
 */
public class ClassInfoFactory {
    private final Map classInfoCache = new HashMap();

    public ClassInfo getClassInfo(String className) {
        ClassInfo info;
        synchronized (classInfoCache) {
            info = (ClassInfo) classInfoCache.get(className);
            if (info == null) {
                info = new SimpleClassInfo(className);
                classInfoCache.put(className, info);
            }
        }
        return info;
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.