Invoking/extending this method will cause the results of the created MetaRuleset to auto-wire state to
the passed instance.

@param ctx
@param instance
963335
protected void setAttributes(FaceletContext ctx, Object instance)
    {
        if (instance != null)
        {
            Class<?> type = instance.getClass();
            if (_mapper == null || !_lastType.equals(type))
            {
                _lastType = type;
                _mapper = createMetaRuleset(type).finish();
            }
            
            _mapper.applyMetadata(ctx, instance);
        }
    }
1146072
function() {
			if (!this.metaPath) {
				this.oMetaContext = this.oMetaModel.getMetaContext(this.path);
				this.metaPath = this.oMetaContext.getPath();
			} else {
				this.oMetaContext = this.oMetaModel.createBindingContext(this.metaPath);
			}
		}
813178
function extendInstance(ctx) {
  // 适配微信小程序属性
  if (!this.properties) {
    Object.defineProperty(this, 'properties', {
      get() {
        return this.props
      }
    })

    defineProperty(this, 'createSelectorQuery', () => createSelectorQuery({
      context: this
    }))

    defineProperty(this, 'triggerEvent', triggerEvent)

    Object.defineProperty(this, 'id', {
      get() {
        return this.props.id || this.$id
      }
    })

    defineProperty(this, 'selectAllComponents', selectAllComponents)

    defineProperty(this, 'selectComponent', selectComponent)

    cannotAchieveComponentInstanceFunctions(this);
  }
}
949450
@Override
    public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
        if (ctx.channel().isRegistered()) {
            // This should always be true with our current DefaultChannelPipeline implementation.
            // The good thing about calling initChannel(...) in handlerAdded(...) is that there will be no ordering
            // surprises if a ChannelInitializer will add another ChannelInitializer. This is as all handlers
            // will be added in the expected order.
            if (initChannel(ctx)) {

                // We are done with init the Channel, removing the initializer now.
                removeState(ctx);
            }
        }
    }
1227931
@Override
    public void activate(final T instance, final Object key) throws DempsyException {
        wrap(() -> activationMethod.invoke(instance, key));
    }
268892
public void setClient(String client) {
        if (meta == null) {
            meta = new EventMeta();
        }
        meta.setClient(client);
    }
400991
protected void activate(ComponentContext compcontext) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Activating " + this.getClass().getName());
        }
        this.unauthenticatedSubjectServiceRef.activate(compcontext);
    }
134167
synchronized void activate(ComponentContext componentContext) throws Exception {
        this.componentContext = componentContext;
        this.classAvailableTransformer = new ClassAvailableTransformer(this, instrumentation, includeBootstrap);
        this.transformer = new ProbeClassFileTransformer(this, instrumentation, includeBootstrap);
        this.proxyActivator = new MonitoringProxyActivator(componentContext.getBundleContext(), this, this.instrumentation);
        this.proxyActivator.activate();
        // The class available transformer is registered as retransform incapable
        // to avoid having to keep track of which classes have been updated with
        // static initializers and serialVersionUID fields.  The probe transformer
        // however, must run through the listener config every time a retransform
        // occurs to allow it to discover new probes and replace currently active
        // probes

        //RTCD 89497-Update the set with the classes
        for (Class<?> clazz : MonitoringUtility.loadMonitoringClasses(componentContext.getBundleContext().getBundle())) {
            for (int i = 0; i < clazz.getMethods().length; i++) {
                Annotation anno = ((clazz.getMethods()[i]).getAnnotation(ProbeSite.class));
                if (anno != null) {
                    String temp = ((ProbeSite) anno).clazz();
                    probeMonitorSet.add(temp);
                }
            }
        }
        //Update to the set ended.

        //RTC D89497 adding instrumentors moved below as the MonitoringUtility.loadMonitoringClasses
        //was resulting in loading classes and in turn getting called during with transform process which
        //might cause hang in some situations
        this.instrumentation.addTransformer(this.transformer, true);
        this.instrumentation.addTransformer(this.classAvailableTransformer);
        // We're active so if we have any listeners, we can run down the loaded
        // classes.
        for (Class<?> clazz : this.instrumentation.getAllLoadedClasses()) {
            classAvailable(clazz);
        }
    }
202781
@Override
    public void visitClassContext(ClassContext clsContext) {
        try {
            JavaClass cls = clsContext.getJavaClass();
            String superName = cls.getSuperclassName();
            if (!Values.DOTTED_JAVA_LANG_OBJECT.equals(superName)) {
                this.classContext = clsContext;
                superclassCode = new HashMap<>();
                JavaClass superCls = cls.getSuperClass();
                childPoolGen = new ConstantPoolGen(cls.getConstantPool());
                parentPoolGen = new ConstantPoolGen(superCls.getConstantPool());
                Method[] methods = superCls.getMethods();
                for (Method m : methods) {
                    String methodName = m.getName();
                    if (m.isPublic() && !m.isAbstract() && !m.isSynthetic() && !Values.CONSTRUCTOR.equals(methodName)
                            && !Values.STATIC_INITIALIZER.equals(methodName)) {
                        String methodInfo = methodName + ':' + m.getSignature();
                        superclassCode.put(methodInfo, new CodeInfo(m.getCode(), m.getAccessFlags()));
                    }
                }
                cls.accept(this);
            }
        } catch (ClassNotFoundException cnfe) {
            bugReporter.reportMissingClass(cnfe);
        } finally {
            superclassCode = null;
            this.classContext = null;
            childPoolGen = null;
            parentPoolGen = null;
        }
    }
1359002
@SuppressWarnings("unchecked")
    public void injectNonContextualInstance(final Object instance) {
        if (instance != null) {
            CreationalContext<Object> creationalContext = manager.createCreationalContext(null);
            InjectionTarget<Object> injectionTarget = (InjectionTarget<Object>) manager
                    .createInjectionTarget(getAnnotatedType(instance));
            injectionTarget.inject(instance, creationalContext);
        }
    }
300585
public void setContext(Context context) {
        context.put(JavacElements.class, this);
        javaCompiler = JavaCompiler.instance(context);
        syms = Symtab.instance(context);
        names = Names.instance(context);
        types = Types.instance(context);
        enter = Enter.instance(context);
    }
67396
public void init(ClientContext clientContext) {
        this.clientContext = clientContext;
        this.clientConnectionStrategyConfig = clientContext.getClientConfig().getConnectionStrategyConfig();
        this.logger = clientContext.getLoggingService().getLogger(ClientConnectionStrategy.class);
    }
1134777
private <X, T> void onBuildMetaModelSuperClass(Class<? super X> clazz, MetaModelBuilder<X, T> metaModelBuilder)
    {
        if (clazz != null && clazz.isAnnotationPresent(javax.persistence.Entity.class))
        {
            while (clazz != null && clazz.isAnnotationPresent(javax.persistence.Entity.class))
            {
                metaModelBuilder.process((Class<X>) clazz);

                for (Field f : clazz.getDeclaredFields())
                {
                    if (f != null && !Modifier.isStatic(f.getModifiers()) && !Modifier.isTransient(f.getModifiers())
                            && !f.isAnnotationPresent(Transient.class))
                    {
                        metaModelBuilder.construct((Class<X>) clazz, f);
                    }

                }
                clazz = clazz.getSuperclass();
            }
        }
    }
625144
def get_instance_assignment(self, ctx):
        
        if ctx is None:
            return None

        visitor = ExprVisitor(self.compiler)
        expr = visitor.visit(ctx.expr())
        expr = expressions.AssignmentCast(self.compiler.env, SourceRef.from_antlr(ctx.op), expr, int)
        expr.predict_type()
        return expr
786980
protected void activate(ComponentContext context) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
            Tr.event(this, tc, "activate", context);
        configAdminRef.activate(context);
        variableRegistryRef.activate(context);
        metaTypeServiceRef.activate(context);
        wsConfigurationHelperRef.activate(context);
        bundleContext = priv.getBundleContext(context);

    }
125497
@Override
    public Expression visitCreator(CreatorContext ctx) {
        ClassNode classNode = this.visitCreatedName(ctx.createdName());

        if (asBoolean(ctx.arguments())) { // create instance of class
            Expression arguments = this.visitArguments(ctx.arguments());
            Expression enclosingInstanceExpression = ctx.getNodeMetaData(ENCLOSING_INSTANCE_EXPRESSION);

            if (null != enclosingInstanceExpression) {
                if (arguments instanceof ArgumentListExpression) {
                    ((ArgumentListExpression) arguments).getExpressions().add(0, enclosingInstanceExpression);
                } else if (arguments instanceof TupleExpression) {
                    throw createParsingFailedException("Creating instance of non-static class does not support named parameters", arguments);
                } else if (arguments instanceof NamedArgumentListExpression) {
                    throw createParsingFailedException("Unexpected arguments", arguments);
                } else {
                    throw createParsingFailedException("Unsupported arguments", arguments); // should never reach here
                }
            }

            if (asBoolean(ctx.anonymousInnerClassDeclaration())) {
                ctx.anonymousInnerClassDeclaration().putNodeMetaData(ANONYMOUS_INNER_CLASS_SUPER_CLASS, classNode);
                InnerClassNode anonymousInnerClassNode = this.visitAnonymousInnerClassDeclaration(ctx.anonymousInnerClassDeclaration());

                List<InnerClassNode> anonymousInnerClassList = anonymousInnerClassesDefinedInMethodStack.peek();
                if (null != anonymousInnerClassList) { // if the anonymous class is created in a script, no anonymousInnerClassList is available.
                    anonymousInnerClassList.add(anonymousInnerClassNode);
                }

                ConstructorCallExpression constructorCallExpression = new ConstructorCallExpression(anonymousInnerClassNode, arguments);
                constructorCallExpression.setUsingAnonymousInnerClass(true);

                return configureAST(constructorCallExpression, ctx);
            }

            return configureAST(
                    new ConstructorCallExpression(classNode, arguments),
                    ctx);
        }

        if (asBoolean(ctx.LBRACK()) || asBoolean(ctx.dims())) { // create array
            ArrayExpression arrayExpression;
            List<List<AnnotationNode>> allDimList;

            if (asBoolean(ctx.arrayInitializer())) {
                ClassNode elementType = classNode;
                allDimList = this.visitDims(ctx.dims());

                for (int i = 0, n = allDimList.size() - 1; i < n; i++) {
                    elementType = elementType.makeArray();
                }

                arrayExpression =
                        new ArrayExpression(
                            elementType,
                            this.visitArrayInitializer(ctx.arrayInitializer()));

            } else {
                Expression[] empties;
                List<List<AnnotationNode>> emptyDimList = this.visitDimsOpt(ctx.dimsOpt());

                if (asBoolean(emptyDimList)) {
                    empties = new Expression[emptyDimList.size()];
                    Arrays.fill(empties, ConstantExpression.EMPTY_EXPRESSION);
                } else {
                    empties = Expression.EMPTY_ARRAY;
                }

                arrayExpression =
                        new ArrayExpression(
                                classNode,
                                null,
                                Stream.concat(
                                        ctx.expression().stream()
                                                .map(e -> (Expression) this.visit(e)),
                                        Arrays.stream(empties)
                                ).collect(Collectors.toList()));


                List<List<AnnotationNode>> exprDimList = ctx.annotationsOpt().stream().map(this::visitAnnotationsOpt).collect(Collectors.toList());
                allDimList = new ArrayList<>(exprDimList);
                Collections.reverse(emptyDimList);
                allDimList.addAll(emptyDimList);
                Collections.reverse(allDimList);
            }

            arrayExpression.setType(createArrayType(classNode, allDimList));

            return configureAST(arrayExpression, ctx);
        }

        throw createParsingFailedException("Unsupported creator: " + ctx.getText(), ctx);
    }
434241
@Override
    public Object visitContextReference(ExcellentParser.ContextReferenceContext ctx) {
        String identifier = ctx.NAME().getText();
        return m_evalContext.resolveVariable(identifier);
    }