Get a wrapper for the given BeanId <p>
195435
@Override
    public final EJSWrapperCommon getWrapper(BeanId id) // f111627
    throws CSIException,
                    RemoteException
    {
        homeEnabled();
        return wrapperManager.getWrapper(id); // d156807.1
    }
897681
@Override
  public <T> T getReference(Class<T> beanType, Object id) {
    methodCalls.add(MethodCall.of("getReference").with("beanType", beanType, "id", id));
    return delegateQuery.getReference(beanType, id);
  }
75227
private static BeanBox[] getParameterInjectAsBeanBoxArray(Object o, boolean allowSpringJsrAnno) {
		Annotation[][] annoss = null;
		Class<?>[] paramTypes = null;
		if (o instanceof Method) {
			annoss = ((Method) o).getParameterAnnotations();
			paramTypes = ((Method) o).getParameterTypes();
		} else if (o instanceof Constructor) {
			annoss = ((Constructor<?>) o).getParameterAnnotations();
			paramTypes = ((Constructor<?>) o).getParameterTypes();
		} else
			return BeanBoxException.throwEX("Only method or Constructor are allowed at here for:" + o);
		BeanBox[] beanBoxes = new BeanBox[annoss.length];
		for (int i = 0; i < annoss.length; i++) {
			Annotation[] annos = annoss[i];
			Object[] v = getInjectAsArray(annos, allowSpringJsrAnno);
			BeanBox inject = new BeanBox();
			if (v != null) { // if parameter has annotation
				inject.setTarget(v[0]);
				inject.setPureValue((Boolean) v[1]);
				inject.setRequired((Boolean) v[2]);
				inject.setType(paramTypes[i]);
			} else // if parameter no annotation
				inject.setTarget(paramTypes[i]);
			beanBoxes[i] = inject;
		}
		return beanBoxes;
	}
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;
    }
510940
<Q extends BaseProxy> AutoBean<Q> getProxyForReturnPayloadGraph(final SimpleProxyId<Q> id) {
    @SuppressWarnings("unchecked")
    AutoBean<Q> bean = (AutoBean<Q>) this.state.returnedProxies.get(id);
    if (bean == null) {
      final Class<Q> proxyClass = id.getProxyClass();
      bean = this.createProxy(proxyClass, id, true);
      this.state.returnedProxies.put(id, bean);
    }

    return bean;
  }
755176
private <D,S> JMapper<D,S> getJMapper(HashMap<String,JMapper> map,Object source){
		Class<?> sourceClass = source instanceof Class?((Class<?>)source):source.getClass();
		JMapper<D,S> jMapper = map.get(sourceClass.getName());
		if(jMapper == null) Error.classNotMapped(source, configuredClass);
		return jMapper;
	}
840983
public static <T> T getInstance(Class<T> beanClass, String beanName) {
		return (T) getInstanceProvider().getInstance(beanClass, beanName);
	}
171083
public MethodInfo get(String beanName, String methodName) {
		return this.cache.get(new Key(beanName, methodName));
	}
824081
protected @Nonnull <T> Provider<T> getBeanProvider(@Nullable BeanResolutionContext resolutionContext, @Nonnull Class<T> beanType) {
        return getBeanProvider(resolutionContext, beanType, null);
    }
1362971
public Object getWrapper() throws Exception
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
        {
            Tr.entry(tc, "getWrapper");
        }

        EJSContainer container = EJSContainer.getDefaultContainer();
        Object retObj = null;
        WrapperManager wm = container.getWrapperManager();

        // The first bytes of serialized data is a header and
        // the first byte of header identifies it as either a
        // BeanId or a WrapperId. So examine first byte to
        // determine whether it is a BeanId or a WrapperId.
        if (ivIdBytes[0] == (byte) 0xAC)
        {
            // First byte indicates it is a BeanId. Use the
            // WrapperManager to find the wrapper in wrapper cache.
            ByteArray byteArray = new ByteArray(ivIdBytes);

            if (DEBUG_ON) // d458325
            {
                if (isTraceOn && tc.isDebugEnabled())
                {
                    Tr.debug(tc, "serialized BeanId bytes = " + byteArray.toString());
                }
            }

            BeanId beanId = BeanId.getBeanId(byteArray, container);

            if (isTraceOn && tc.isDebugEnabled())
            {
                Tr.debug(tc, "deserialized a BeanId = " + beanId
                             + ", primary key = " + beanId.getPrimaryKey());
            }

            retObj = wm.getWrapper(beanId).getLocalObject();
        }
        else if (ivIdBytes[0] == (byte) 0xAD) // d458325
        {
            // First byte indicates it is a WrapperId that was serialized.
            // Recreate the WrapperId and use it to get BeanId, local business
            // interface name, and local business interface index.
            WrapperId wrapperId = new WrapperId(ivIdBytes);
            int index = wrapperId.ivInterfaceIndex;
            String interfaceName = wrapperId.ivInterfaceClassName;

            if (DEBUG_ON) // d458325
            {
                if (isTraceOn && tc.isDebugEnabled())
                {
                    Tr.debug(tc, "serialized WrapperId bytes[" + ivIdBytes.length + "] = "
                                 + wrapperId.toString());
                    Tr.debug(tc, "WrapperId.ivInterfaceIndex = " + index
                                 + ", WrapperId.ivInterfaceClassName = " + interfaceName
                                 + ", WrapperId.ivBeanIdIndex = " + wrapperId.ivBeanIdIndex);
                }
            }

            ByteArray byteArray = wrapperId.getBeanIdArray();
            BeanId beanId = BeanId.getBeanId(byteArray, container);
            BeanMetaData bmd = beanId.getBeanMetaData();

            Tr.debug(tc, "deserialized a WrapperId for BeanId = " + beanId
                         + ", primary key = " + beanId.getPrimaryKey());

            // Obtain the home and create the 'set' of wrappers for the
            // deserialized BeanId.
            EJSHome home = bmd.getHome();
            EJSWrapperCommon wc = home.internalCreateWrapper(beanId);

            // Finally, decide which proxy is needed from the set. This may
            // be for an aggregate local wrapper (all business local interfaces)
            // or it may be for a specific interface, in which case the index
            // must be verified                                          F743-34304
            if (index == EJSWrapperBase.AGGREGATE_LOCAL_INDEX)
            {
                retObj = wc.getAggregateLocalWrapper();
            }
            else
            {
                // Now verify index is still valid. If we fail over to a new server,
                // the index for the interface may be different than original server.
                // In that case, we need to determine the new index.
                Class<?>[] bInterfaces = bmd.ivBusinessLocalInterfaceClasses;
                int numberOfLocalInterfaces = bInterfaces.length;
                String wrapperInterfaceName = null;
                if (index < numberOfLocalInterfaces)
                {
                    wrapperInterfaceName = bInterfaces[index].getName();
                }

                // Is the BusinessLocalWrapper for the correct interface name?
                if ((wrapperInterfaceName == null) || (!wrapperInterfaceName.equals(interfaceName)))
                {
                    // Nope, index must be invalid, so we need to get an updated index
                    // that matches the desired interface name.
                    // Fix up the WrapperId with index that matches this server.
                    index = bmd.getRequiredLocalBusinessInterfaceIndex(interfaceName);
                }

                // Now that we have correct index, obtain the corresponding
                // proxy object.
                retObj = wc.getLocalBusinessObject(index);
            }
        }

        // Return the wrapper
        if (isTraceOn && tc.isEntryEnabled())
        {
            Tr.exit(tc, "getWrapper returning: " +
                        (retObj == null ? retObj
                                        : (retObj.getClass().getName() +
                                        '@' + Integer.toHexString(retObj.hashCode()))));
        }
        return retObj;
    }
112603
public static Object getBean(String name, Class requiredType) throws BeansException {
		return applicationContext.getBean(name, requiredType);
	}
835446
@Override
    @SuppressWarnings("unchecked")
    public <T> T get(Contextual<T> contextual) {
        Bean bean = (Bean) contextual;
        // you can store the bean somewhere
        if (somewhere.containsKey(bean.getName())) {
            return (T) somewhere.get(bean.getName());
        } else {
            return null;
        }
    }
236603
@Override
  public final IConverterToFromString<?> lazyGet(
    final Map<String, Object> pAddParam,
      final String pBeanName) throws Exception {
    // There is no way to get from Map partially initialized bean
    // in this double-checked locking implementation
    // cause putting to the Map fully initialized bean
    IConverterToFromString<?> convrt = this.convertersMap.get(pBeanName);
    if (convrt == null) {
      // locking:
      synchronized (this.convertersMap) {
        // make sure again whether it's null after locking:
        convrt = this.convertersMap.get(pBeanName);
        if (convrt == null) {
          if (pBeanName.equals(CnvTfsLong.class.getSimpleName())) {
            convrt = lazyGetCnvTfsLong();
          } else if (pBeanName.equals(CnvTfsDate.class.getSimpleName())) {
            convrt = createPutCnvTfsDate();
          } else if (pBeanName.equals(CnvTfsDateTime.class
            .getSimpleName())) {
            convrt = createPutCnvTfsDateTime();
          } else if (pBeanName.equals(CnvTfsDateTimeSec.class
            .getSimpleName())) {
            convrt = createPutCnvTfsDateTimeSec();
          } else if (pBeanName.equals(CnvTfsDateTimeSecMs.class
            .getSimpleName())) {
            convrt = createPutCnvTfsDateTimeSecMs();
          } else if (pBeanName.equals(CnvTfsBigDecimal.class
            .getSimpleName())) {
            convrt = createPutCnvTfsBigDecimal();
          } else if (pBeanName.equals(CnvTfsFloat.class.getSimpleName())) {
            convrt = createPutCnvTfsFloat();
          } else if (pBeanName.equals(CnvTfsDouble.class.getSimpleName())) {
            convrt = createPutCnvTfsDouble();
          } else if (pBeanName.equals(CnvTfsBoolean.class.getSimpleName())) {
            convrt = createPutCnvTfsBoolean();
          } else if (pBeanName.equals(CnvTfsInteger.class.getSimpleName())) {
            convrt = lazyGetCnvTfsInteger();
          } else if (pBeanName.equals(CnvTfsString.class.getSimpleName())) {
            convrt = lazyGetCnvTfsString();
          } else {
            for (Map.Entry<Class<? extends IHasId<Long>>, String> entry
              : this.hasLongIdMap.entrySet()) {
              if (pBeanName.equals(CnvTfsHasId.class.getSimpleName()
                + "Long" + entry.getKey().getSimpleName())) {
                convrt = createHasLongIdConverter(pBeanName,
                  entry.getKey(), entry.getValue());
                break;
              }
            }
            for (Map.Entry<Class<? extends IHasId<Integer>>, String> entry
              : this.hasIntegerIdMap.entrySet()) {
              if (pBeanName.equals(CnvTfsHasId.class.getSimpleName()
                + "Integer" + entry.getKey().getSimpleName())) {
                convrt = createHasIntegerIdConverter(pBeanName,
                  entry.getKey(), entry.getValue());
                break;
              }
            }
            for (Map.Entry<Class<? extends IHasId<String>>, String> entry
              : this.hasStringIdMap.entrySet()) {
              if (pBeanName.equals(CnvTfsHasId.class.getSimpleName()
                + "String" + entry.getKey().getSimpleName())) {
                convrt = createHasStringIdConverter(pBeanName,
                  entry.getKey(), entry.getValue());
                break;
              }
            }
            for (Map.Entry<Class<? extends IHasId<?>>, String> entry
              : this.hasCompositeIdMap.entrySet()) {
              if (pBeanName.equals(CnvTfsHasId.class.getSimpleName()
                + "Composite" + entry.getKey().getSimpleName())) {
                convrt = createHasCompositeIdConverter(pBeanName,
                  entry.getKey(), entry.getValue());
                break;
              }
            }
            for (Class<?> cmpsClass : this.compositeClasses) {
              if (pBeanName.equals(getCnvTfsObjectName(cmpsClass))) {
                convrt = lazyGetCnvTfsObject(cmpsClass);
                break;
              }
            }
            for (Class<? extends Enum<?>> enumClass : this.enumsClasses) {
              if (pBeanName.equals(CnvTfsEnum
                .class.getSimpleName() + enumClass.getSimpleName())) {
                convrt = createCnvTfsEnum(pBeanName, enumClass);
                break;
              }
            }
          }
        }
      }
    }
    if (convrt == null) {
      throw new ExceptionWithCode(ExceptionWithCode.CONFIGURATION_MISTAKE,
        "There is no converter with name " + pBeanName);
    }
    return convrt;
  }
771076
public static <T> T getBean(ApplicationContext appContext, String id, Class<T> clazz) {
        try {
            return appContext.getBean(id, clazz);
        } catch (BeansException e) {
            return null;
        }
    }
908024
public static Map<String, Object> beanToMap(Object bean, boolean isToUnderlineCase, boolean ignoreNullValue) {
		return beanToMap(bean, new LinkedHashMap<String, Object>(), isToUnderlineCase, ignoreNullValue);
	}
479708
public BeanId getBeanId() {
        if (ivBeanId == null) {
            ivBeanId = new BeanId(ivBMD.j2eeName, null, false);
        }
        return ivBeanId;
    }
432486
public T getProvider(final String id) {
        return (T) beanFactory.getBean(providerFactory.beanName(id));
    }