View Javadoc
1   /*******************************************************************************
2    * Portions created by Sebastian Thomschke are copyright (c) 2005-2011 Sebastian
3    * Thomschke.
4    * 
5    * All Rights Reserved. This program and the accompanying materials
6    * are made available under the terms of the Eclipse Public License v1.0
7    * which accompanies this distribution, and is available at
8    * http://www.eclipse.org/legal/epl-v10.html
9    * 
10   * Contributors:
11   *     Sebastian Thomschke - initial implementation.
12   *******************************************************************************/
13  package net.sf.oval.context;
14  
15  /**
16   * @author Sebastian Thomschke
17   */
18  public class ClassContext extends OValContext
19  {
20  	private static final long serialVersionUID = 1L;
21  
22  	private final Class< ? > clazz;
23  
24  	public ClassContext(final Class< ? > clazz)
25  	{
26  		this.clazz = clazz;
27  		this.compileTimeType = clazz;
28  	}
29  
30  	/**
31  	 * @return the clazz
32  	 */
33  	public Class< ? > getClazz()
34  	{
35  		return clazz;
36  	}
37  
38  	/**
39  	 * {@inheritDoc}
40  	 */
41  	@Override
42  	public String toString()
43  	{
44  		return clazz.getName();
45  	}
46  }