blob: 825df7dbad96aff49f194781eaefe1c1d44debc6 (
plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
|
/*
D-Bus Java Implementation
Copyright (c) 2005-2006 Matthew Johnson
This program is free software; you can redistribute it and/or modify it
under the terms of either the GNU Lesser General Public License Version 2 or the
Academic Free Licence Version 2.1.
Full licence texts are included in the COPYING file with this program.
*/
package org.freedesktop.dbus.types;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Map;
/**
* The type of a map.
* Should be used whenever you need a Type variable for a map.
*/
public class DBusMapType implements ParameterizedType
{
private Type k;
private Type v;
/**
* Create a map type.
* @param k The type of the keys.
* @param v The type of the values.
*/
public DBusMapType(Type k, Type v)
{
this.k = k;
this.v = v;
}
public Type[] getActualTypeArguments()
{
return new Type[] { k, v };
}
public Type getRawType()
{
return Map.class;
}
public Type getOwnerType()
{
return null;
}
}
|