Example usage for org.eclipse.jdt.core.dom SuperConstructorInvocation getProperty

List of usage examples for org.eclipse.jdt.core.dom SuperConstructorInvocation getProperty

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.dom SuperConstructorInvocation getProperty.

Prototype

public final Object getProperty(String propertyName) 

Source Link

Document

Returns the value of the named property of this node, or null if none.

Usage

From source file:org.eclipse.wb.internal.core.utils.ast.AstNodeUtils.java

License:Open Source License

/**
 * @param invocation//from w  ww.  java  2  s .co m
 *          the not <code>null</code> {@link SuperConstructorInvocation}
 * @return not <code>null</code> {@link IMethodBinding} for given
 *         {@link SuperConstructorInvocation}.
 */
public static IMethodBinding getSuperBinding(SuperConstructorInvocation invocation) {
    Assert.isNotNull(invocation);
    // try to get binding from property (copy of binding added by DesignerAST)
    {
        IMethodBinding binding = (IMethodBinding) invocation.getProperty(AstParser.KEY_METHOD_BINDING);
        if (binding != null) {
            return binding;
        }
    }
    // get standard binding, should not return "null"
    return invocation.resolveConstructorBinding();
}