List of usage examples for org.eclipse.jdt.internal.compiler.lookup SourceTypeBinding implementsInterface
public boolean implementsInterface(ReferenceBinding anInterface, boolean searchHierarchy)
From source file:org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitScope.java
License:Open Source License
/** * Ensure Groovy types extend groovy.lang.GroovyObject *//*ww w. ja v a2s. c o m*/ private void augmentTypeHierarchy(SourceTypeBinding typeBinding) { if (typeBinding.isAnnotationType() || typeBinding.isInterface()) { return; } ReferenceBinding groovyLangObjectBinding = getGroovyLangObjectBinding(); if (!typeBinding.implementsInterface(groovyLangObjectBinding, true)) { ReferenceBinding[] superInterfaceBindings = typeBinding.superInterfaces; if (superInterfaceBindings != null) { int count = superInterfaceBindings.length; System.arraycopy(superInterfaceBindings, 0, superInterfaceBindings = new ReferenceBinding[count + 1], 0, count); superInterfaceBindings[count] = groovyLangObjectBinding; typeBinding.superInterfaces = superInterfaceBindings; } } }