Retrieves the vardef information of the specified bean.
326467
def get_module_fields(module_name)
    login! unless logged_in?  
    json = <<-EOF
      {
        "session": "#{@sugar_session_id}",
        "module_name": "#{module_name}"
      }
    EOF
    json.gsub!(/^\s{6}/,'')
    SugarCRM::Response.handle(send!(:get_module_fields, json), @session)
  end
856974
public static Map<String, Object> getBeanProperties(Object bean) {
        Map<String, Object> props = new HashMap<>();

        if (bean == null) {
            return props;
        }

        Class<?> clazz = bean.getClass();
        try {
            //Public fields:
            Field[] fields = clazz.getFields();
            for (Field field : fields) {
                String name = field.getName();
                if (!name.equals("class")) {
                    props.put(field.getName(), field.get(bean));
                }
            }

            //Getters:
            BeanInfo info = Introspector.getBeanInfo(clazz);
            for (PropertyDescriptor desc : info.getPropertyDescriptors()) {
                Method readMethod = desc.getReadMethod();
                String name = desc.getName();
                if (readMethod != null && !name.equals("class")) {
                    props.put(desc.getName(), readMethod.invoke(bean));
                }
            }

            return props;
        } catch (IntrospectionException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) {
            throw new UniformException("Error while getting bean object properties of class" + clazz.getName(), ex);
        }
    }
182145
@Override public Set<R> getValueFromBean(D bean) throws IllegalBioPAXArgumentException
	{
		Object value = null;
		try
		{
			if (this.getDomain().isInstance(bean)) value = this.getMethod.invoke(bean);
		}
		catch (IllegalAccessException e)
		{
			throw new IllegalBioPAXArgumentException(
					"Could not invoke get method " + getMethod.getName() + " for " + bean, e);
		}
		catch (IllegalArgumentException e)
		{
			throw new IllegalBioPAXArgumentException(
					"Could not invoke get method " + getMethod.getName() + " for " + bean, e);
		}

		catch (InvocationTargetException e)
		{
			throw new IllegalBioPAXArgumentException(
					"Could not invoke get method " + getMethod.getName() + " for " + bean, e);
		}

		if (value == null) return Collections.emptySet();
		else if (this.isMultipleCardinality())
		{
			return (Collections.unmodifiableSet(((Set<R>) value)));
		} else
		{
			return Collections.singleton(((R) value));
		}
	}
236393
private void registerJsfCdiToSpring(BeanDefinition definition) {

		if (definition instanceof AnnotatedBeanDefinition) {
			AnnotatedBeanDefinition annDef = (AnnotatedBeanDefinition) definition;

			String scopeName = null;
			// firstly check whether bean is defined via configuration
			if (annDef.getFactoryMethodMetadata() != null) {
				scopeName = deduceScopeName(annDef.getFactoryMethodMetadata());
			}
			else {
				// fallback to type
				scopeName = deduceScopeName(annDef.getMetadata());
			}

			if (scopeName != null) {
				definition.setScope(scopeName);

				log.debug("{} - Scope({})", definition.getBeanClassName(), scopeName.toUpperCase());
			}
		}
	}
169157
public static VariableResolver getReadVariableResolver(JspContext jspContext) {
        assert jspContext != null;

        /* todo: ugly ugly ugly...getting the appropriate variable resolver should be easier than this */
        Object actionForm = getActionForm(((PageContext)jspContext).getRequest());

        NetUIReadVariableResolver netuiVariableResolver =
            new NetUIReadVariableResolver(jspContext.getVariableResolver());
        netuiVariableResolver.setActionForm(unwrapForm(actionForm));

        return netuiVariableResolver;
    }
537396
@Override
    public BeanInfo getComponentMetadata(FacesContext context, Resource componentResource)
    {
        BeanInfo beanInfo = null;

        checkNull(context, "context");

        try
        {
            Facelet compositeComponentFacelet;
            FaceletFactory.setInstance(_faceletFactory);
            try
            {
                compositeComponentFacelet
                        = _faceletFactory.getCompositeComponentMetadataFacelet(componentResource.getURL());
            }
            finally
            {
                FaceletFactory.setInstance(null);
            }
            //context.getAttributes().put(BUILDING_COMPOSITE_COMPONENT_METADATA, Boolean.TRUE);

            // Create a temporal tree where all components will be put, but we are only
            // interested in metadata.
            UINamingContainer compositeComponentBase
                    = (UINamingContainer) context.getApplication().createComponent(
                    context, UINamingContainer.COMPONENT_TYPE, null);

            // Fill the component resource key, because this information should be available
            // on metadata to recognize which is the component used as composite component base.
            // Since this method is called from Application.createComponent(FacesContext,Resource),
            // and in that specific method this key is updated, this is the best option we
            // have for recognize it (also this key is used by UIComponent.isCompositeComponent)
            compositeComponentBase.getAttributes().put(Resource.COMPONENT_RESOURCE_KEY, componentResource);

            // According to UserTagHandler, in this point we need to wrap the facelet
            // VariableMapper, so local changes are applied on "page context", but
            // data is retrieved from full context
            FaceletContext faceletContext = (FaceletContext) context.
                    getAttributes().get(FaceletContext.FACELET_CONTEXT_KEY);
            VariableMapper orig = faceletContext.getVariableMapper();
            try
            {
                faceletContext.setVariableMapper(new VariableMapperWrapper(orig));

                compositeComponentBase.pushComponentToEL(context, compositeComponentBase);

                compositeComponentFacelet.apply(context, compositeComponentBase);

                compositeComponentBase.popComponentFromEL(context);
            }
            finally
            {
                faceletContext.setVariableMapper(orig);
            }

            beanInfo = (BeanInfo) compositeComponentBase.getAttributes().get(UIComponent.BEANINFO_KEY);
        }
        catch (IOException e)
        {
            throw new FacesException(e);
        }
        //finally
        //{
        //context.getAttributes().remove(BUILDING_COMPOSITE_COMPONENT_METADATA);
        //}

        return beanInfo;
    }
367131
private static BeanInfo getBeanInfoOptional(Class<?> beanClass)
    {
        try
        {
            return Introspector.getBeanInfo(beanClass);
        } 
        catch (IntrospectionException e)
        {
            return null;
        }
    }
994342
@java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getScriptVariables() {
    return getScriptVariablesMap();
  }
301968
public VarValueDef getBinding( VarDef var)
    {
    VarBindingDef binding = bindings_.get( var);
    return
      binding == null
      ? null
      : binding.getValueDef();
    }
1169234
public MBeanAttributeInfo[] getAttributesInfo(String domainName, String beanName) throws JMException {
		return getAttributesInfo(ObjectNameUtil.makeObjectName(domainName, beanName));
	}
1106923
private void parseVarRef() {

        consume(TokenType.DOLLAR, true);
        final String varName = parseVarName();
        mPipeBuilder.addVarRefExpr(getTransaction(), varName);
    }
817819
public <T extends ListBuffer<? super JCVariableDecl>> T variableDeclarators(JCModifiers mods,
                                                                         JCExpression type,
                                                                         T vdefs)
    {
        return variableDeclaratorsRest(token.pos, mods, type, ident(), false, null, vdefs);
    }
1050977
private void parseVariableDefinitions(BeanDefinitionBuilder builder, Element element) {
        Map<String, String> testVariables = new LinkedHashMap<String, String>();
        List<Element> variableElements = DomUtils.getChildElementsByTagName(element, "variable");
        for (Element variableDefinition : variableElements) {
            testVariables.put(variableDefinition.getAttribute("name"), variableDefinition.getAttribute("value"));
        }

        if (!testVariables.isEmpty()) {
            builder.addPropertyValue("variables", testVariables);
        }
    }
1124759
protected Object getMacroBeanValue(Object bean, String property) {

        Object result = null;
        if ((bean != null) && CmsStringUtil.isNotEmptyOrWhitespaceOnly(property)) {
            try {
                PropertyUtilsBean propBean = BeanUtilsBean.getInstance().getPropertyUtils();
                result = propBean.getProperty(bean, property);
            } catch (Exception e) {
                LOG.error("Unable to access property '" + property + "' of '" + bean + "'.", e);
            }
        } else {
            LOG.info("Invalid parameters: property='" + property + "' bean='" + bean + "'.");
        }
        return result;
    }
342184
public BeanInfo getBeanInfo() {
        if (mBeanInfo == null) {
            try { 
                mBeanInfo = getTeaToolsUtils().getBeanInfo(mType);
            }
            catch (Exception e) {
                return null;
            }
        }

        return mBeanInfo;
    }
789476
public synchronized Map<String, String> getVariableMetaDataByReference(int variableIndex) {
    while (variableIndex >= variableMetaData.size()) {
      variableMetaData.add(new HashMap<>());
    }
    return variableMetaData.get(variableIndex);
  }
308482
public static KeywordInfo getKeywordInfo(String keyword, ApplicationContext context, Map<String, String> beanMap) {
        Object bean = context.getBean(beanMap.get(keyword));
        return AnnotationUtils.findAnnotation(bean.getClass(), KeywordInfo.class);
    }