static String[] getSuperTypeSignatures(IType subType, IType superType) throws JavaModelException { if (superType.isInterface()) { return subType.getSuperInterfaceTypeSignatures(); } else { return new String[] {subType.getSuperclassTypeSignature()}; } }
/** * 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()}; }
/** * 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()}; }
/** * 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()}; }
/** * 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()}; }
/** * 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()}; }
/** * 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()}; }
/** * 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(final IType subType, final IType superType) throws JavaModelException { if (superType.isInterface()) { return subType.getSuperInterfaceTypeSignatures(); } else { return new String[] { subType.getSuperclassTypeSignature() }; } }
/** * 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(final IType subType, final IType superType) throws JavaModelException { if (superType.isInterface()) { return subType.getSuperInterfaceTypeSignatures(); } else { return new String[] { subType.getSuperclassTypeSignature() }; } }
/** * Returns a type variable mapping from a superclass to a subclass. * * @param supertype * the type representing the superclass * @param subtype * the type representing the subclass * @return a type variable mapping. The mapping entries consist of simple type variable names. * @throws JavaModelException * if the signature of one of the types involved could not be retrieved */ public static TypeVariableMaplet[] superTypeToInheritedType(final IType supertype, final IType subtype) throws JavaModelException { Assert.isNotNull(subtype); Assert.isNotNull(supertype); final ITypeParameter[] domain= supertype.getTypeParameters(); if (domain.length > 0) { final String signature= subtype.getSuperclassTypeSignature(); if (signature != null) { final String[] range= getVariableSignatures(signature); if (range.length > 0) return parametersToSignatures(domain, range, true); } } return new TypeVariableMaplet[0]; }
/** * Returns a type variable mapping from a superclass to a subclass. * * @param supertype * the type representing the superclass * @param subtype * the type representing the subclass * @return a type variable mapping. The mapping entries consist of simple type variable names. * @throws JavaModelException * if the signature of one of the types involved could not be retrieved */ public static TypeVariableMaplet[] superTypeToInheritedType(final IType supertype, final IType subtype) throws JavaModelException { Assert.isNotNull(subtype); Assert.isNotNull(supertype); final ITypeParameter[] domain= supertype.getTypeParameters(); if (domain.length > 0) { final String signature= subtype.getSuperclassTypeSignature(); if (signature != null) { final String[] range= getVariableSignatures(signature); if (range.length > 0) return parametersToSignatures(domain, range, true); } } return new TypeVariableMaplet[0]; }
/** * Returns a type variable mapping from a superclass to a subclass. * * @param supertype * the type representing the superclass * @param subtype * the type representing the subclass * @return a type variable mapping. The mapping entries consist of simple type variable names. * @throws JavaModelException * if the signature of one of the types involved could not be retrieved */ public static TypeVariableMaplet[] superTypeToInheritedType(final IType supertype, final IType subtype) throws JavaModelException { Assert.isNotNull(subtype); Assert.isNotNull(supertype); final ITypeParameter[] domain= supertype.getTypeParameters(); if (domain.length > 0) { final String signature= subtype.getSuperclassTypeSignature(); if (signature != null) { final String[] range= getVariableSignatures(signature); if (range.length > 0) return parametersToSignatures(domain, range, true); } } return new TypeVariableMaplet[0]; }
@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; }
/** * Returns a type variable mapping from a subclass to a superclass. * * @param type * the type representing the subclass class * @return a type variable mapping. The mapping entries consist of simple type variable names. * @throws JavaModelException * if the signature of one of the types involved could not be retrieved */ public static TypeVariableMaplet[] subTypeToInheritedType(final IType type) throws JavaModelException { Assert.isNotNull(type); final ITypeParameter[] domain= type.getTypeParameters(); if (domain.length > 0) { final String signature= type.getSuperclassTypeSignature(); if (signature != null) { final String[] range= getVariableSignatures(signature); if (range.length > 0) return parametersToSignatures(domain, range, false); } } return new TypeVariableMaplet[0]; }
/** * Returns a type variable mapping from a subclass to a superclass. * * @param type * the type representing the subclass class * @return a type variable mapping. The mapping entries consist of simple type variable names. * @throws JavaModelException * if the signature of one of the types involved could not be retrieved */ public static TypeVariableMaplet[] subTypeToInheritedType(final IType type) throws JavaModelException { Assert.isNotNull(type); final ITypeParameter[] domain= type.getTypeParameters(); if (domain.length > 0) { final String signature= type.getSuperclassTypeSignature(); if (signature != null) { final String[] range= getVariableSignatures(signature); if (range.length > 0) return parametersToSignatures(domain, range, false); } } return new TypeVariableMaplet[0]; }
/** * Returns a type variable mapping from a subclass to a superclass. * * @param type * the type representing the subclass class * @return a type variable mapping. The mapping entries consist of simple type variable names. * @throws JavaModelException * if the signature of one of the types involved could not be retrieved */ public static TypeVariableMaplet[] subTypeToInheritedType(final IType type) throws JavaModelException { Assert.isNotNull(type); final ITypeParameter[] domain= type.getTypeParameters(); if (domain.length > 0) { final String signature= type.getSuperclassTypeSignature(); if (signature != null) { final String[] range= getVariableSignatures(signature); if (range.length > 0) return parametersToSignatures(domain, range, false); } } return new TypeVariableMaplet[0]; }
/** * Returns a type variable mapping from a subclass to a superclass. * * @param subtype * the type representing the subclass * @param supertype * the type representing the superclass * @return a type variable mapping. The mapping entries consist of simple type variable names. * @throws JavaModelException * if the signature of one of the types involved could not be retrieved */ public static TypeVariableMaplet[] subTypeToSuperType(final IType subtype, final IType supertype) throws JavaModelException { Assert.isNotNull(subtype); Assert.isNotNull(supertype); final TypeVariableMaplet[] mapping= subTypeToInheritedType(subtype); if (mapping.length > 0) { final ITypeParameter[] range= supertype.getTypeParameters(); if (range.length > 0) { final String signature= subtype.getSuperclassTypeSignature(); if (signature != null) { final String[] domain= getVariableSignatures(signature); if (domain.length > 0) return composeMappings(mapping, signaturesToParameters(domain, range)); } } } return mapping; }
/** * Returns a type variable mapping from a subclass to a superclass. * * @param subtype * the type representing the subclass * @param supertype * the type representing the superclass * @return a type variable mapping. The mapping entries consist of simple type variable names. * @throws JavaModelException * if the signature of one of the types involved could not be retrieved */ public static TypeVariableMaplet[] subTypeToSuperType(final IType subtype, final IType supertype) throws JavaModelException { Assert.isNotNull(subtype); Assert.isNotNull(supertype); final TypeVariableMaplet[] mapping= subTypeToInheritedType(subtype); if (mapping.length > 0) { final ITypeParameter[] range= supertype.getTypeParameters(); if (range.length > 0) { final String signature= subtype.getSuperclassTypeSignature(); if (signature != null) { final String[] domain= getVariableSignatures(signature); if (domain.length > 0) return composeMappings(mapping, signaturesToParameters(domain, range)); } } } return mapping; }
/** * Returns a type variable mapping from a subclass to a superclass. * * @param subtype * the type representing the subclass * @param supertype * the type representing the superclass * @return a type variable mapping. The mapping entries consist of simple type variable names. * @throws JavaModelException * if the signature of one of the types involved could not be retrieved */ public static TypeVariableMaplet[] subTypeToSuperType(final IType subtype, final IType supertype) throws JavaModelException { Assert.isNotNull(subtype); Assert.isNotNull(supertype); final TypeVariableMaplet[] mapping= subTypeToInheritedType(subtype); if (mapping.length > 0) { final ITypeParameter[] range= supertype.getTypeParameters(); if (range.length > 0) { final String signature= subtype.getSuperclassTypeSignature(); if (signature != null) { final String[] domain= getVariableSignatures(signature); if (domain.length > 0) return composeMappings(mapping, signaturesToParameters(domain, range)); } } } return mapping; }
addPackage(fields[i].getTypeSignature(), pkgs, type, binary, subMonitor.split(1)); addPackage(type.getSuperclassTypeSignature(), pkgs, type, binary, subMonitor.split(1)); addPackages(type.getSuperInterfaceTypeSignatures(), pkgs, type, binary, subMonitor.split(1));