Gets the context for the property name factory.
340247
private function getPropertyNameCollectionFactoryContext(ResourceMetadata $resourceMetadata): array
    {
        $attributes = $resourceMetadata->getAttributes();
        $context = [];

        if (isset($attributes['normalization_context'][AbstractNormalizer::GROUPS])) {
            $context['serializer_groups'] = (array) $attributes['normalization_context'][AbstractNormalizer::GROUPS];
        }

        if (!isset($attributes['denormalization_context'][AbstractNormalizer::GROUPS])) {
            return $context;
        }

        if (isset($context['serializer_groups'])) {
            foreach ((array) $attributes['denormalization_context'][AbstractNormalizer::GROUPS] as $groupName) {
                $context['serializer_groups'][] = $groupName;
            }

            return $context;
        }

        $context['serializer_groups'] = (array) $attributes['denormalization_context'][AbstractNormalizer::GROUPS];

        return $context;
    }
76773
function _getPrefsContext() {
        var projectRoot = ProjectManager.getProjectRoot();  // note: null during unit tests!
        return { location : { scope: "user", layer: "project", layerID: projectRoot && projectRoot.fullPath } };
    }
1171298
private String extractPrefix(ApplicationContext context,
			ConfigurationBeanFactoryMetadata beanFactoryMetaData, String beanName) {
		ConfigurationProperties annotation = context.findAnnotationOnBean(beanName,
				ConfigurationProperties.class);
		if (beanFactoryMetaData != null) {
			ConfigurationProperties override = beanFactoryMetaData
					.findFactoryAnnotation(beanName, ConfigurationProperties.class);
			if (override != null) {
				// The @Bean-level @ConfigurationProperties overrides the one at type
				// level when binding. Arguably we should render them both, but this one
				// might be the most relevant for a starting point.
				annotation = override;
			}
		}
		return annotation.prefix();
	}
935564
def get_context(namespace, context_id):
    """"""
    context_obj = get_state(context_id, namespace=namespace)
    if not context_obj:
        raise ContextError("Context '{}' not found in namespace '{}'".format(
            context_id, namespace))
    return context_obj
282748
public com.google.protobuf.ByteString
      getContextNameBytes() {
    java.lang.Object ref = contextName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      contextName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
704285
public static Context getContext()
    {
        if (ctx == null)
        {
            try
            {
                setContext(null);
            }
            catch (Exception e)
            {
                log.error("Cannot instantiate the InitialContext", e);
                throw new OJBRuntimeException(e);
            }
        }
        return ctx;
    }
1097603
@Override
	public String getContext() {

		final AbstractSchemaNode parent = getProperty(SchemaMethod.schemaNode);
		final StringBuilder buf = new StringBuilder();

		if (parent != null) {

			buf.append(parent.getProperty(SchemaNode.name));
			buf.append(".");
			buf.append(getProperty(name));
		}

		return buf.toString();
	}
1192935
def _getContextFactory(path, workbench):
    
    try:
        return succeed(getContextFactory(path))
    except IOError:
        d = prompt(workbench, u"E-mail entry", u"Enter e-mail:")
        d.addCallback(_makeCredentials, path, workbench)
        d.addCallback(lambda _result: getContextFactory(path))
        return d
248845
static String getContextName(String name) {
        int index = name.lastIndexOf('/');
        return index == -1 ? "" : name.substring(0, index);
    }
1218531
public static String getGetterName(String propertyName) {
        final String suffix = getSuffixForGetterOrSetter(propertyName);
        return PROPERTY_GET_PREFIX + suffix;
    }
826461
def get_context_info(self, context_name):
        """"""
        context_info = self.zap.context.context(context_name)
        if not isinstance(context_info, dict):
            raise ZAPError('Context with name "{0}" wasn\'t found'.format(context_name))

        return context_info
180264
private String getSourceName(final String property) {
        if (propertyNameMap.containsKey(property)) {
            return propertyNameMap.get(property);
        } else {
            return property;
        }
    }
1327289
public String getPrefix()
    {
        if (_propertySet == null || _propertySet.getAnnotation(PropertySet.class) == null )
            return "";
        
        return _propertySet.getAnnotation(PropertySet.class).prefix();
    }
662729
function Context() {
	/**
	 * @member {Object}
	 * @property {Object} client
	 * @property {Object<Call>} client.map - map from call name and call id
	 * @property {Array<Call>} client.list
	 * @property {Object} server
	 * @property {Object<Call>} server.map - map from call name and call id
	 * @property {Array<Call>} server.list
	 * @private
	 */
	this._calls = {
		client: {
			map: Object.create(null),
			list: []
		},
		server: {
			map: Object.create(null),
			list: []
		}
	}

	/**
	 * @member {Object}
	 * @property {Object} client
	 * @property {Object<Message>} client.map - map from message name and message id
	 * @property {Array<Message>} client.list
	 * @property {Object} server
	 * @property {Object<Message>} server.map - map from message name and message id
	 * @property {Array<Message>} server.list
	 * @private
	 */
	this._messages = {
		client: {
			map: Object.create(null),
			list: []
		},
		server: {
			map: Object.create(null),
			list: []
		}
	}
}
1055177
private Context createContext() throws Exception
   {
      Properties properties = new Properties();
      properties.setProperty("java.naming.factory.initial", "org.jnp.interfaces.LocalOnlyContextFactory");
      properties.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
      return new InitialContext(properties);
   }
239180
def from_context(cls, ctx, config_paths=None, project=None):
        """"""
        if ctx.obj is None:
            ctx.obj = Bunch()
        ctx.obj.cfg = cls(ctx.info_name, config_paths, project=project)
        return ctx.obj.cfg
883223
private String getNamingContextName() {    	
	    if (namingContextName == null) {
			Container parent = getParent();
			if (parent == null) {
				namingContextName = getName();
			} else {
				Stack<String> stk = new Stack<String>();
				StringBuffer buff = new StringBuffer();
				while (parent != null) {
					stk.push(parent.getName());
					parent = parent.getParent();
				}
				while (!stk.empty()) {
					buff.append("/" + stk.pop());
				}
				buff.append(getName());
				namingContextName = buff.toString();
			}
		}
		return namingContextName;
    }