/******************************************************************************* * Copyright (c) 2005, 2013 IBM Corporation and others. * 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: * Andrew Niefer (IBM) - Initial API and implementation * Markus Schorn (Wind River Systems) * Sergey Prigogin (Google) *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser.cpp; import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.ICompositeType; import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.IValue; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPField; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; /** * Binding for a specialization of a field. */ public class CPPFieldSpecialization extends CPPVariableSpecialization implements ICPPField { public CPPFieldSpecialization(IBinding orig, ICPPClassType owner, ICPPTemplateParameterMap tpmap, IType type, IValue value) { super(orig, owner, tpmap, type, value); } private ICPPField getField() { return (ICPPField) getSpecializedBinding(); } @Override public int getVisibility() { return getField().getVisibility(); } @Override public ICPPClassType getClassOwner() { return (ICPPClassType) getOwner(); } @Override public ICompositeType getCompositeTypeOwner() { return getClassOwner(); } @Override public int getFieldPosition() { return getField().getFieldPosition(); } }