Return basic scope names matching given type

@param type Scope type
@return set of scope names
765186
public Set<String> getBasicScopeNames(ScopeType type) {
        if (type != null) {
            Set<String> names = new HashSet<String>();
            for (IBasicScope child : children.keySet()) {
                if (child.getType().equals(type)) {
                    names.add(child.getName());
                }
            }
            return names;
        }
        return getScopeNames();
    }
115187
@SuppressWarnings("static-method")
	protected List<JvmTypeParameter> getTypeParametersFor(XtendTypeDeclaration type) {
		if (type instanceof XtendClass) {
			return ((XtendClass) type).getTypeParameters();
		}
		if (type instanceof XtendInterface) {
			return ((XtendInterface) type).getTypeParameters();
		}
		return Collections.emptyList();
	}
519079
public List<String> getDomainObjectTypeNames() {
		List<DomainObjectType> types = getDomainObjectTypes();
		List<String> typeNames = new ArrayList<String>(types.size());
		for (DomainObjectType typ : types) {
			typeNames.add(typ.getTypeName());
		}
		return typeNames;
	}
743655
private Stream<Type> scopeTypes(GraqlCompute query) {
        // Get all types if query.inTypes() is empty, else get all scoped types of each meta type.
        // Only include attributes and implicit "has-xxx" relations when user specifically asked for them.
        if (query.in().isEmpty()) {
            ImmutableSet.Builder<Type> typeBuilder = ImmutableSet.builder();

            if (scopeIncludesAttributes(query)) {
                tx.getMetaConcept().subs().forEach(typeBuilder::add);
            } else {
                tx.getMetaEntityType().subs().forEach(typeBuilder::add);
                tx.getMetaRelationType().subs()
                        .filter(relationType -> !relationType.isImplicit()).forEach(typeBuilder::add);
            }

            return typeBuilder.build().stream();
        } else {
            Stream<Type> subTypes = query.in().stream().map(t -> {
                Label label = Label.of(t);
                Type type = tx.getType(label);
                if (type == null) throw GraqlQueryException.labelNotFound(label);
                return type;
            }).flatMap(Type::subs);

            if (!scopeIncludesAttributes(query)) {
                subTypes = subTypes.filter(relationType -> !relationType.isImplicit());
            }

            return subTypes;
        }
    }
974187
public List<String> getBeanNames(Class<?> type) {
    if (typeNames.containsKey(type)) { return typeNames.get(type); }
    List<String> names = CollectUtils.newArrayList();
    for (Map.Entry<String, Class<?>> entry : nameTypes.entrySet()) {
      if (type.isAssignableFrom(entry.getValue())) {
        names.add(entry.getKey());
      }
    }
    typeNames.put(type, names);
    return names;
  }
960802
public List<Element> findElements(Class<?> type) {
    List<Element> result = new ArrayList<>();
    LinkedList<Element> stack = new LinkedList<>(this.getChildren());

    if (this.getClass() == type) {
      result.add(this);
    }

    while (!stack.isEmpty()) {
      Element child = stack.pop();
      stack.addAll(0, child.getChildren());
      if (child.getClass() == type) {
        result.add(child);
      }
    }

    return result;
  }
180005
public Scope getDefiningScope(String name) {
        for (Scope s = this; s != null; s = s.parentScope) {
            Map<String,Symbol> symbolTable = s.getSymbolTable();
            if (symbolTable != null && symbolTable.containsKey(name)) {
                return s;
            }
        }
        return null;
    }
106702
@RequestMapping(value = "/scope", method = GET, produces = APPLICATION_JSON_VALUE)
	public List<Scope> allScopes() {
		return this.scopeService.getAllScopes();
	}
368083
public static List<Field> getAllFields(Class<?> type) {
        List<Field> fields = new ArrayList<>();

        for (Class<?> currentType = type; currentType != null; currentType = currentType.getSuperclass()) {
            fields.addAll(Arrays.asList(currentType.getDeclaredFields()));
        }

        return fields;
    }
364265
public TypeUsage.Builder scope(Optional<? extends QualifiedName> scope) {
    if (scope.isPresent()) {
      return scope(scope.get());
    } else {
      return clearScope();
    }
  }
973488
public List<Symbol> getAllSymbolsForType(JSType type) {
    if (type == null) {
      return ImmutableList.of();
    }

    UnionType unionType = type.toMaybeUnionType();
    if (unionType != null) {
      List<Symbol> result = new ArrayList<>(2);
      for (JSType alt : unionType.getAlternates()) {
        // Our type system never has nested unions.
        Symbol altSym = getSymbolForTypeHelper(alt, true);
        if (altSym != null) {
          result.add(altSym);
        }
      }
      return result;
    }
    Symbol result = getSymbolForTypeHelper(type, true);
    return result == null ? ImmutableList.of() : ImmutableList.of(result);
  }
384942
public String getTypeNameForCast(Class<?> type) {
        Integer jdbcType = jdbcTypeMapping.get(type);
        if (jdbcType == null) {
            jdbcType = javaTypeMapping.getType(type).getSQLTypes()[0];
        }
        return templates.getCastTypeNameForCode(jdbcType);
    }
439969
public static List<Instance> findAllScopedInstances( AbstractApplication app ) {

		List<Instance> instanceList = new ArrayList<> ();
		List<Instance> todo = new ArrayList<> ();
		todo.addAll( app.getRootInstances());

		while( ! todo.isEmpty()) {
			Instance current = todo.remove( 0 );
			todo.addAll( current.getChildren());
			if( isTarget( current ))
				instanceList.add( current );
		}

		return instanceList;
	}
864845
private TypedScope getScopeDeclaredIn() {
    if (declarationScope != null) {
      return declarationScope;
    }

    int dotIndex = fnName.indexOf('.');
    if (dotIndex != -1) {
      String rootVarName = fnName.substring(0, dotIndex);
      TypedVar rootVar = enclosingScope.getVar(rootVarName);
      if (rootVar != null) {
        return rootVar.getScope();
      }
    }
    return enclosingScope;
  }
1024257
public Set<Method> getMethodsMatchParams(Class<?>... types) {
        return getMethodsFromDescriptors(store.get(index(MethodParameterScanner.class), names(types).toString()), loaders());
    }
823266
ScopeState visibilityIn(QualifiedName scope, QualifiedName type) {
    Set<QualifiedName> possibleConflicts = typesInScope(scope).get(type.getSimpleName());
    if (possibleConflicts.equals(ImmutableSet.of(type))) {
      return ScopeState.IN_SCOPE;
    } else if (!possibleConflicts.isEmpty()) {
      return ScopeState.HIDDEN;
    } else if (!scope.isTopLevel()) {
      return visibilityIn(scope.enclosingType(), type);
    } else {
      return visibilityIn(scope.getPackage(), type);
    }
  }
1117216
public static boolean isBasicType(String type){
		for(String basicType : basicTypeArray){
			if(basicType.equals(type)){
				return true;
			}
		}
		return false;
	}