Method to override in order to specialize binding of target.

        :param target: target to bind.
        :param ctx: target ctx.
        :return: bound target.
767464
def _bind_target(self, target, ctx=None):
        

        result = target

        try:
            # get annotations from target if exists.
            local_annotations = get_local_property(
                target, Annotation.__ANNOTATIONS_KEY__, [], ctx=ctx
            )
        except TypeError:
            raise TypeError('target {0} must be hashable.'.format(target))

        # if local_annotations do not exist, put them in target
        if not local_annotations:
            put_properties(
                target,
                properties={Annotation.__ANNOTATIONS_KEY__: local_annotations},
                ctx=ctx
            )

        # insert self at first position
        local_annotations.insert(0, self)

        # add target to self targets
        if target not in self.targets:
            self.targets.append(target)

        return result
539784
def get_expression_target(expression: Expression, expr_vars: InheritedDict) -> BindingTarget:
    ''''''
    root = expression.get_object_tree()
    if len(root.children) != 1 or not PROPERTY_EXPRESSION_REGEX.fullmatch(expression.code):
        error = BindingError('Expression should be property expression')
        error.add_info('Expression', expression.code)
        raise error
    if root.children[0].children:
        return PropertyExpressionTarget(expression, expr_vars)
    return GlobalValueExpressionTarget(expression, expr_vars)
817043
def setTargetRange(self, targetRange, padding=None):
        
        rangeMin, rangeMax = targetRange
        self.histLutItem.setLevels(rangeMin, rangeMax)
258320
def _get_target(self):
        
        if None in [self._func, self._func_kwargs, self._func_kwargs, self._every_kwargs]:
            raise ValueError('You must call the .every() and .run() methods on every tab.')
        return self._loop
1105134
function (name, target) {
            var _ctor = __define.fixTargetCtor(target||this),
                _member = _ctor[__define.fixTargetKey(name)];

            if(!_member&&_ctor!==ZNObject){
                return this.member(name, _ctor._super_);
            }

            return _member;
        }
1028945
def expand(self, name=None, target=None, **kwargs):
    
    if name is None:
      raise TargetDefinitionException('{}:?'.format(self._parse_context.rel_path, name),
                                      'The alias() must have a name!')
    if target is None:
      raise TargetDefinitionException('{}:{}'.format(self._parse_context.rel_path, name),
                                      'The alias() must have a "target" parameter.')
    self._parse_context.create_object(
      AliasTarget,
      type_alias='alias',
      name=name,
      dependencies=[target] if target else [],
      **kwargs
    )
183266
def _index_target(self, target_adaptor):
    """"""
    # Instantiate the target.
    address = target_adaptor.address
    target = self._instantiate_target(target_adaptor)
    self._target_by_address[address] = target

    for dependency in target_adaptor.dependencies:
      if dependency in self._target_dependencies_by_address[address]:
        raise self.DuplicateAddressError(
          'Addresses in dependencies must be unique. '
          "'{spec}' is referenced more than once by target '{target}'."
          .format(spec=dependency.spec, target=address.spec)
        )
      # Link its declared dependencies, which will be indexed independently.
      self._target_dependencies_by_address[address].add(dependency)
      self._target_dependees_by_address[dependency].add(address)
    return target
721769
def decorate_callable(self, target):
        

        # noinspection PyUnusedLocal
        def absorb_mocks(test_case, *args):
            return target(test_case)

        should_absorb = not (self.pass_mocks or isinstance(target, type))
        result = absorb_mocks if should_absorb else target
        for patcher in self.patchers:
            result = patcher(result)
        return result
890932
def get_target(self, target):
        
        if target not in self._target_cache:
            self._target_cache[target] = self._get_target(target)
        return self._target_cache[target]
56048
def _deserialize_dict(cls, cls_target, dict_):
        

        instance = cls_target.__new__(cls_target)
        dict_deserialized = cls._deserialize_dict_attributes(cls_target, dict_)
        instance.__dict__ = cls._fill_default_values(cls_target,
                                                     dict_deserialized)

        return instance
709809
function setTarget(target) {
        var targetMethods = {};
        for (var name in methods) {
            targetMethods[name] = wrapMethod(target, methods[name]);
        }
        return targetMethods;
    }
780965
def _bind_target(self, target, ctx=None, *args, **kwargs):
        """"""

        result = super(Interceptor, self)._bind_target(
            target=target, ctx=ctx, *args, **kwargs
        )

        pointcut = getattr(self, Interceptor.POINTCUT)

        weave(result, pointcut=pointcut, advices=self.intercepts, ctx=ctx)

        return result
498856
def compatibility_or_constraints(self, target):
    
    if self.get_options().is_flagged('interpreter_constraints'):
      return tuple(self.interpreter_constraints)
    return tuple(target.compatibility or self.interpreter_constraints)
774641
public void setEditorTarget (PropertyEditorTarget target)
    {
        if (target instanceof DBMetaColumnNode)
        {
            super.setEditorTarget(target);
            this.tfColumnName.setText((String)target.getAttribute(DBMetaColumnNode.ATT_COLUMN_NAME));
        }
        else
        {
            throw new UnsupportedOperationException("This editor can only edit DBMetaColumnNode objects");
        }
    }
554684
def get_platform_for_target(self, target):
    
    if not target.payload.platform and target.is_synthetic:
      derived_from = target.derived_from
      platform = derived_from and getattr(derived_from, 'platform', None)
      if platform:
        return platform
    return self.get_platform_by_name(target.payload.platform, target)
1309297
def bind_to(self, argspec, dispatcher):
        
        self.bound_to[argspec.key].add((argspec, dispatcher))
        dispatcher.bind(self.f, argspec)
790505
function (target, name, meta){
            var _ctor = __define.fixTargetCtor(target),
                _key = __define.fixTargetKey(name),
                _exist = _key in _ctor,
                _descriptor = {};

            if(!_exist){
                _descriptor = Object.defineProperty(target, 'on' + name.toLowerCase(), {
                    get: function () {
                        var _listeners = this.__handlers__[name];
                        if (_listeners) {
                            return _listeners[0].handler;
                        }
                        else {
                            return null;
                        }
                    },
                    set: function (value) {
                        var _handlers = this.__handlers__;
                        var _listeners = _handlers[name] = _handlers[name] || [];

                        _listeners[0] = {
                            owner: this,
                            handler: value,
                            context: null
                        };
                    }
                });
            }
            _ctor[_key] = {
                name: name,
                type: 'event',
                meta: meta,
                descriptor: _descriptor
            };

            return _exist;
        }