blob: c354f58906818127604d00543301d20819e45ae4 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2009 by SAP AG, Walldorf.
* 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:
* SAP AG - initial API and implementation
*******************************************************************************/
package org.eclipse.jst.ws.jaxws.dom.runtime.persistence.sync;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.ITypeHierarchy;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jst.ws.jaxws.dom.runtime.persistence.IModelElementSynchronizer;
import org.eclipse.jst.ws.jaxws.utils.annotations.IAnnotationInspector;
class SeiMethodSynchronizer extends AbstractMethodSynchronizer
{
public SeiMethodSynchronizer(IModelElementSynchronizer parent)
{
super(parent);
}
@Override
protected void visitExposableMethods(IMethodVisitor visitor, ITypeHierarchy hierarchy, IAnnotationInspector inspector) throws JavaModelException
{
visitRecursively(visitor, hierarchy.getType(), hierarchy, inspector);
}
private void visitRecursively(IMethodVisitor visitor, IType type, ITypeHierarchy hierarchy, IAnnotationInspector inspector) throws JavaModelException
{
for (IMethod method : type.getMethods())
{
visitor.visit(method, inspector);
}
for (IType superIntf : hierarchy.getSuperInterfaces(type))
{
visitRecursively(visitor, superIntf, hierarchy, resource().newAnnotationInspector(superIntf));
}
}
}