Java Code Examples for org.eclipse.jdt.core.IType#getSuperInterfaceTypeSignatures()
The following examples show how to use
org.eclipse.jdt.core.IType#getSuperInterfaceTypeSignatures() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TypeProposalUtils.java From eclipse.jdt.ls with Eclipse Public License 2.0 | 5 votes |
static String[] getSuperTypeSignatures(IType subType, IType superType) throws JavaModelException { if (superType.isInterface()) { return subType.getSuperInterfaceTypeSignatures(); } else { return new String[] {subType.getSuperclassTypeSignature()}; } }
Example 2
Source File: StubCreator.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
protected void appendSuperInterfaceTypes(final IType type) throws JavaModelException { final String[] signatures= type.getSuperInterfaceTypeSignatures(); if (signatures.length > 0) { if (type.isInterface()) fBuffer.append(" extends "); //$NON-NLS-1$ else fBuffer.append(" implements "); //$NON-NLS-1$ } for (int index= 0; index < signatures.length; index++) { if (index > 0) fBuffer.append(","); //$NON-NLS-1$ fBuffer.append(Signature.toString(signatures[index])); } }
Example 3
Source File: Jdt2Ecore.java From sarl with Apache License 2.0 | 5 votes |
@Override public IType next() { final IType c = this.current; if (c == null) { throw new NoSuchElementException(); } final String name = c.getFullyQualifiedName(); this.encountered.add(name); try { final String[] superTypes; if (this.isInterface) { superTypes = c.getSuperInterfaceTypeSignatures(); } else { superTypes = new String[] {c.getSuperclassTypeSignature()}; } for (final String signature : superTypes) { if (!Strings.isNullOrEmpty(signature)) { final String resolvedSignature = resolveType(c, signature); if (!Strings.isNullOrEmpty(resolvedSignature)) { this.queue.add(resolvedSignature); } } } } catch (Exception exception) { // } updateCurrent(); return c; }
Example 4
Source File: CompilationUnitCompletion.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 3 votes |
/** * Returns the super interface signatures of <code>subType</code> if * <code>superType</code> is an interface, otherwise returns the super * type signature. * * @param subType the sub type signature * @param superType the super type signature * @return the super type signatures of <code>subType</code> * @throws JavaModelException if any java model operation fails */ private String[] getSuperTypeSignatures(IType subType, IType superType) throws JavaModelException { if (superType.isInterface()) return subType.getSuperInterfaceTypeSignatures(); else return new String[] {subType.getSuperclassTypeSignature()}; }
Example 5
Source File: LazyGenericTypeProposal.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 3 votes |
/** * Returns the super interface signatures of <code>subType</code> if * <code>superType</code> is an interface, otherwise returns the super * type signature. * * @param subType the sub type signature * @param superType the super type signature * @return the super type signatures of <code>subType</code> * @throws JavaModelException if any java model operation fails */ private String[] getSuperTypeSignatures(IType subType, IType superType) throws JavaModelException { if (superType.isInterface()) return subType.getSuperInterfaceTypeSignatures(); else return new String[] {subType.getSuperclassTypeSignature()}; }