@Override public Set<Object> visitLocalTypeDeclarationStatement(final LocalTypeDeclarationStatement node, final String name) { final TypeDeclaration typeDeclaration = node.getTypeDeclaration(); if (typeDeclaration.isNull()) { return Collections.emptySet(); } if (StringUtilities.equals(typeDeclaration.getName(), name)) { final TypeDefinition type = typeDeclaration.getUserData(Keys.TYPE_DEFINITION); if (type != null) { return Collections.<Object>singleton(type); } } return searchUpScope( name, typeDeclaration.getUserData(Keys.TYPE_DEFINITION), new LinkedHashSet<String>(), true ); }
@Override public Set<Object> visitLocalTypeDeclarationStatement(final LocalTypeDeclarationStatement node, final String name) { final TypeDeclaration typeDeclaration = node.getTypeDeclaration(); if (typeDeclaration.isNull()) { return Collections.emptySet(); } if (StringUtilities.equals(typeDeclaration.getName(), name)) { final TypeDefinition type = typeDeclaration.getUserData(Keys.TYPE_DEFINITION); if (type != null) { return Collections.<Object>singleton(type); } } return searchUpScope( name, typeDeclaration.getUserData(Keys.TYPE_DEFINITION), new LinkedHashSet<String>(), true ); }
@Override public Set<Object> visitLocalTypeDeclarationStatement(final LocalTypeDeclarationStatement node, final String name) { final TypeDeclaration typeDeclaration = node.getTypeDeclaration(); if (typeDeclaration.isNull()) { return Collections.emptySet(); } if (StringUtilities.equals(typeDeclaration.getName(), name)) { final TypeDefinition type = typeDeclaration.getUserData(Keys.TYPE_DEFINITION); if (type != null) { return Collections.<Object>singleton(type); } } return searchUpScope( name, typeDeclaration.getUserData(Keys.TYPE_DEFINITION), new LinkedHashSet<String>(), true ); }
@Override public boolean matches(final INode other, final Match match) { if (other instanceof TypeDeclaration) { final TypeDeclaration otherDeclaration = (TypeDeclaration) other; return !otherDeclaration.isNull() && _classType == otherDeclaration._classType && matchString(getName(), otherDeclaration.getName()) && matchAnnotationsAndModifiers(otherDeclaration, match) && getTypeParameters().matches(otherDeclaration.getTypeParameters(), match) && getBaseType().matches(otherDeclaration.getBaseType(), match) && getInterfaces().matches(otherDeclaration.getInterfaces(), match) && getMembers().matches(otherDeclaration.getMembers(), match); } return false; }
@Override public boolean matches(final INode other, final Match match) { if (other instanceof TypeDeclaration) { final TypeDeclaration otherDeclaration = (TypeDeclaration) other; return !otherDeclaration.isNull() && _classType == otherDeclaration._classType && matchString(getName(), otherDeclaration.getName()) && matchAnnotationsAndModifiers(otherDeclaration, match) && getTypeParameters().matches(otherDeclaration.getTypeParameters(), match) && getBaseType().matches(otherDeclaration.getBaseType(), match) && getInterfaces().matches(otherDeclaration.getInterfaces(), match) && getMembers().matches(otherDeclaration.getMembers(), match); } return false; }
@Override public boolean matches(final INode other, final Match match) { if (other instanceof TypeDeclaration) { final TypeDeclaration otherDeclaration = (TypeDeclaration) other; return !otherDeclaration.isNull() && _classType == otherDeclaration._classType && matchString(getName(), otherDeclaration.getName()) && matchAnnotationsAndModifiers(otherDeclaration, match) && getTypeParameters().matches(otherDeclaration.getTypeParameters(), match) && getBaseType().matches(otherDeclaration.getBaseType(), match) && getInterfaces().matches(otherDeclaration.getInterfaces(), match) && getMembers().matches(otherDeclaration.getMembers(), match); } return false; }