Get the top level namespace or this namespace if we are the top. Note:
this method should probably return type bsh.This to be consistent with
getThis();
@param declaringInterpreter the declaring interpreter
@return the global
966131
public This getGlobal(final Interpreter declaringInterpreter) {
        if (this.parent != null)
            return this.parent.getGlobal(declaringInterpreter);
        else
            return this.getThis(declaringInterpreter);
    }
1327533
private NameSpace getNonBlockParent()
    {
        NameSpace parent = super.getParent();
        if ( parent instanceof BlockNameSpace )
            return ((BlockNameSpace)parent).getNonBlockParent();
        else
            return parent;
    }
201603
def namespace(self):
        
        if self.prefix is None:
            return self.defaultNamespace()
        return self.resolvePrefix(self.prefix)
894782
def class_declaration(self, type_):
        

        utils.loggers.queries_engine.debug(
            "Container traits: searching class declaration for %s", type_)

        cls_declaration = self.get_container_or_none(type_)
        if not cls_declaration:
            raise TypeError(
                'Type "%s" is not instantiation of std::%s' %
                (type_.decl_string, self.name()))
        return cls_declaration
718192
function _getTypeAnnotation() {
  var node = this.node;

  if (!node) {
    // handle initializerless variables, add in checks for loop initializers too
    if (this.key === "init" && this.parentPath.isVariableDeclarator()) {
      var declar = this.parentPath.parentPath;
      var declarParent = declar.parentPath;

      // for (var NODE in bar) {}
      if (declar.key === "left" && declarParent.isForInStatement()) {
        return t.stringTypeAnnotation();
      }

      // for (var NODE of bar) {}
      if (declar.key === "left" && declarParent.isForOfStatement()) {
        return t.anyTypeAnnotation();
      }

      return t.voidTypeAnnotation();
    } else {
      return;
    }
  }

  if (node.typeAnnotation) {
    return node.typeAnnotation;
  }

  var inferer = inferers[node.type];
  if (inferer) {
    return inferer.call(this, node);
  }

  inferer = inferers[this.parentPath.type];
  if (inferer && inferer.validParent) {
    return this.parentPath.getTypeAnnotation();
  }
}
127050
public static String getPrefix(String namespaceString)
    {
        Namespace namespace = toNamespace(namespaceString);

        return namespace != null ? namespace.getType() : null;
    }
719615
@SuppressWarnings("unchecked")
    public Declaration getDeclaration(final String identifier) {
        if ( this.dirty || (this.declarations == null) ) {
            this.declarations = this.getExtendedLhs( this, null ).getOuterDeclarations();
            this.dirty = false;
        }
        return this.declarations.get( identifier );
    }
1363060
@Override
  public String getPrefix(String namespaceURI)
  {
    if (namespaceURI == null || !namespaceURI.equals("http://www.christofreichardt.de/java/tracer"))
      throw new IllegalArgumentException("Accept only default namespace.");
    
    return "dns";
  }
467874
public T namespace(String prefix, String namespaceUri) {
        getXpathVariableExtractor().getNamespaces().put(prefix, namespaceUri);
        xmlMessageValidationContext.getNamespaces().put(prefix, namespaceUri);
        return self;
    }
1125935
public Map<String, Declaration> getInnerDeclarations() {
        final Map inner = new HashMap( this.basePattern.getOuterDeclarations() );
        for ( Pattern pattern : remainingPatterns ) {
            inner.putAll( pattern.getOuterDeclarations() );
        }
        return inner;
    }
956749
private String generatePrefix(String namespace) {
		// assert namespace == namespace.intern();
		while (true) {
			++autoDeclaredPrefixes;
			// fast lookup uses table that was pre-initialized in static{} ....
			final String prefix = autoDeclaredPrefixes < precomputedPrefixes.length ? precomputedPrefixes[autoDeclaredPrefixes] : ("n" + autoDeclaredPrefixes).intern();
			// make sure this prefix is not declared in any scope (avoid hiding
			// in-scope prefixes)!
			for (int i = namespaceEnd - 1; i >= 0; --i) {
				if (prefix == namespacePrefix[i]) {
					continue; // prefix is already declared - generate new and
								// try again
				}
			}
			// declare prefix

			if (namespaceEnd >= namespacePrefix.length) {
				ensureNamespacesCapacity();
			}
			namespacePrefix[namespaceEnd] = prefix;
			namespaceUri[namespaceEnd] = namespace;
			++namespaceEnd;

			return prefix;
		}
	}
289099
@Override
    public String[] getPreDeclaredNamespaceUris() {
        LinkedList<String> ll=new LinkedList<String>();
        if (nss!=null) {
            ll.addAll(nss.values());
        }
        ll.add(XSI_NS);
        ll.add(DOMProcessing.XSD_NS_FOR_XML);
        ll.add(XML_NS);
        ll.add(PROV_NS);
        //System.out.println("namespaceprefixmapper " + ll);
        String[] tmp=new String[1];
        return ll.toArray(tmp);
    }
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;
  }
643472
@SuppressWarnings("unchecked")
    public static Class<Object> getInnerClassType(Class<?> declaringClass, String name) throws ClassNotFoundException {
        return (Class<Object>) Class.forName(declaringClass.getName() + "$" + name);
    }
776214
@Override
	public HalLinkRelation getNamespacedRelFor(LinkRelation relation) {

		HalLinkRelation result = HalLinkRelation.of(relation);

		return defaultCurie == null ? result : result.curieIfUncuried(defaultCurie);
	}
1212450
public static <T> MethodLiteral<T, Constructor<?>> get(Constructor<?> constructor,
      TypeLiteral<T> declaringType) {
    Preconditions.checkArgument(
        constructor.getDeclaringClass().equals(declaringType.getRawType()),
        "declaringType (%s) must be the type literal where constructor was declared (%s)!",
        declaringType, constructor.getDeclaringClass());
    return new ConstructorLiteral<T>(constructor, declaringType);
  }
661384
public static String getUniquePrefix(XMLStreamWriter writer, String namespaceURI, boolean declare)
        throws XMLStreamException {
        String prefix = writer.getPrefix(namespaceURI);
        if (prefix == null) {
            prefix = getUniquePrefix(writer);

            if (declare) {
                writer.setPrefix(prefix, namespaceURI);
                writer.writeNamespace(prefix, namespaceURI);
            }
        }
        return prefix;
    }