2014-10-02 01:32:36 +00:00
|
|
|
/******************************************************************************
|
|
|
|
* Copyright (c) 2002 - 2014 IBM Corporation.
|
|
|
|
* 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:
|
|
|
|
* IBM Corporation - initial API and implementation
|
|
|
|
*****************************************************************************/
|
|
|
|
|
2009-02-26 16:54:30 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
package com.ibm.wala.cast.ir.translator;
|
|
|
|
|
|
|
|
import java.util.Collection;
|
|
|
|
|
|
|
|
import com.ibm.wala.cast.tree.CAstQualifier;
|
|
|
|
import com.ibm.wala.cast.tree.CAstType;
|
|
|
|
|
2018-06-05 19:00:31 +00:00
|
|
|
public abstract class AbstractClassEntity extends AbstractDataEntity {
|
2009-02-26 16:54:30 +00:00
|
|
|
private final CAstType.Class type;
|
|
|
|
|
|
|
|
public AbstractClassEntity(CAstType.Class type) {
|
|
|
|
this.type = type;
|
|
|
|
}
|
|
|
|
|
2013-06-25 15:57:37 +00:00
|
|
|
@Override
|
2009-02-26 16:54:30 +00:00
|
|
|
public String toString() {
|
|
|
|
return "class " + type.getName();
|
|
|
|
}
|
|
|
|
|
2013-06-25 15:57:37 +00:00
|
|
|
@Override
|
2009-02-26 16:54:30 +00:00
|
|
|
public int getKind() {
|
|
|
|
return TYPE_ENTITY;
|
|
|
|
}
|
|
|
|
|
2013-06-25 15:57:37 +00:00
|
|
|
@Override
|
2009-02-26 16:54:30 +00:00
|
|
|
public String getName() {
|
|
|
|
return type.getName();
|
|
|
|
}
|
|
|
|
|
2013-06-25 15:57:37 +00:00
|
|
|
@Override
|
2009-02-26 16:54:30 +00:00
|
|
|
public CAstType getType() {
|
|
|
|
return type;
|
|
|
|
}
|
|
|
|
|
2013-06-25 15:57:37 +00:00
|
|
|
@Override
|
2009-02-26 16:54:30 +00:00
|
|
|
public Collection<CAstQualifier> getQualifiers() {
|
|
|
|
return type.getQualifiers();
|
|
|
|
}
|
2017-02-03 01:33:27 +00:00
|
|
|
}
|