Example usage for org.eclipse.jdt.core BindingKey createTypeBindingKey

List of usage examples for org.eclipse.jdt.core BindingKey createTypeBindingKey

Introduction

In this page you can find the example usage for org.eclipse.jdt.core BindingKey createTypeBindingKey.

Prototype

public static String createTypeBindingKey(String typeName) 

Source Link

Document

Creates a new type binding key from the given type name.

Usage

From source file:org.assertj.eclipse.assertions.generator.internal.converter.util.ProjectBindings.java

License:Apache License

private ITypeBinding getTypeBinding(String typeName) {
    final ASTParser projectParser = AstParserFactory.astParserFor(project);

    String[] keys = new String[] { BindingKey.createTypeBindingKey(typeName) };
    final ITypeBindingRequestor requestor = new ITypeBindingRequestor();
    projectParser.createASTs(new ICompilationUnit[] {}, keys, requestor, null);
    return requestor.getITypeBinding();
}

From source file:org.switchyard.tools.ui.wizards.NewServiceTestClassWizardPage.java

License:Open Source License

private BindingKey getBindingForQName(QName typeName) {
    if (typeName == null) {
        return null;
    }//ww w  .  j a v a  2s  . c  o  m
    String typeString = Object.class.getCanonicalName();
    if (typeName.getNamespaceURI() == XMLConstants.NULL_NS_URI && typeName.getLocalPart() != null
            && typeName.getLocalPart().startsWith("java:")) { //$NON-NLS-1$
        typeString = typeName.getLocalPart().substring(5);
    }
    return new BindingKey(BindingKey.createTypeBindingKey(typeString));
}