Skip to main content
summaryrefslogtreecommitdiffstats
blob: 982d08d5a982fa116748a50b82b00a90f2ea3035 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
Copyright (c) 2008 Arno Haase.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html

Contributors:
    Arno Haase - initial API and implementation
 */
package org.eclipse.xtend.backend;

import java.util.List;

import org.eclipse.xtend.backend.common.BackendType;
import org.eclipse.xtend.backend.common.CreationCache;
import org.eclipse.xtend.backend.util.DoubleKeyCache;


/**
 * 
 * @author Arno Haase (http://www.haase-consulting.com)
 */
final class CreationCacheImpl implements CreationCache {
	private DoubleKeyCache<BackendType, List<Object>, Object> _cache = new DoubleKeyCache<BackendType, List<Object>, Object> () {
		@Override
		protected Object create(BackendType t, List<Object> key2) {
			return t.create();
		}
	};
	
	public Object createRaw (BackendType t, List<Object> idParams) {
		return _cache.get (t, idParams);
	}
}

Back to the top