Subclasses may override this method.
776287
def _setStartSegment(self, segmentIndex, **kwargs):
        
        segments = self.segments
        oldStart = segments[-1]
        oldLast = segments[0]
        # If the contour ends with a curve on top of a move,
        # delete the move.
        if oldLast.type == "curve" or oldLast.type == "qcurve":
            startOn = oldStart.onCurve
            lastOn = oldLast.onCurve
            if startOn.x == lastOn.x and startOn.y == lastOn.y:
                self.removeSegment(0)
                # Shift new the start index.
                segmentIndex = segmentIndex - 1
                segments = self.segments
        # If the first point is a move, convert it to a line.
        if segments[0].type == "move":
            segments[0].type = "line"
        # Reorder the points internally.
        segments = segments[segmentIndex - 1:] + segments[:segmentIndex - 1]
        points = []
        for segment in segments:
            for point in segment:
                points.append(((point.x, point.y), point.type,
                               point.smooth, point.name, point.identifier))
        # Clear the points.
        for point in self.points:
            self.removePoint(point)
        # Add the points.
        for point in points:
            position, type, smooth, name, identifier = point
            self.appendPoint(
                position,
                type=type,
                smooth=smooth,
                name=name,
                identifier=identifier
            )
1264323
private void checkFinalClassOverrides(Node ctor) {
    if (!isFunctionOrClass(ctor)) {
      return;
    }

    JSType type = ctor.getJSType().toMaybeFunctionType();
    if (type != null && type.isConstructor()) {
      JSType finalParentClass = getSuperClassInstanceIfFinal(bestInstanceTypeForMethodOrCtor(ctor));
      if (finalParentClass != null) {
        compiler.report(
            JSError.make(
                ctor,
                EXTEND_FINAL_CLASS,
                type.getDisplayName(),
                finalParentClass.getDisplayName()));
      }
    }
  }
83641
private void removeOverriddenMethod(MethodDoc method) {
        ClassDoc overriddenClass = method.overriddenClass();
        if (overriddenClass != null) {
            for (int i = 0; i < methlist.size(); i++) {
                ClassDoc cd = methlist.get(i).containingClass();
                if (cd == overriddenClass || overriddenClass.subclassOf(cd)) {
                    methlist.remove(i);  // remove overridden method
                    return;
                }
            }
        }
    }
713092
def register(cls, subclass):
        """"""
        if not isinstance(cls, type):
            raise TypeError("Can only register classes")
        if issubclass(subclass, cls):
            return  # Already a subclass
        # Subtle: test for cycles *after* testing for "already a subclass";
        # this means we allow X.register(X) and interpret it as a no-op.
        if issubclass(cls, subclass):
            # This would create a cycle, which is bad for the algorithm below
            raise RuntimeError("Refusing to create an inheritance cycle")
        cls._abc_registry.add(subclass)
        ABCMeta._abc_invalidation_counter += 1
646621
private void overrideDeploymentProperties(T overrider, Class overriderClass) {
        if (!overriderClass.getSimpleName().equals(ArtifactoryMaven3NativeConfigurator.class.getSimpleName())) {
            try {
                Field deploymentPropertiesField = overriderClass.getDeclaredField("deploymentProperties");
                deploymentPropertiesField.setAccessible(true);
                Object deploymentProperties = deploymentPropertiesField.get(overrider);

                if (deploymentProperties == null) {
                    Field matrixParamsField = overriderClass.getDeclaredField("matrixParams");
                    matrixParamsField.setAccessible(true);
                    Object matrixParams = matrixParamsField.get(overrider);
                    if (matrixParams != null) {
                        deploymentPropertiesField.set(overrider, matrixParams);
                    }
                }
            } catch (NoSuchFieldException | IllegalAccessException e) {
                converterErrors.add(getConversionErrorMessage(overrider, e));
            }
        }
    }
339010
final void setSubtype(Byte value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setSubtype", value);
        jmo.setField(JsHdrAccess.SUBTYPE, value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setSubtype");
    }
823231
def override_operation(self, operation, reason):
        """"""
        prev_class = (self.local_classification, self.remote_classification)
        prev_op = self.operation
        assert operation != prev_op
        assert operation in PAIR_OPERATIONS
        if self.any_entry.target.synchronizer.verbose > 3:
            write(
                "override_operation({}, {}) -> {} ({})".format(
                    prev_class, prev_op, operation, reason
                ),
                debug=True,
            )
        self.operation = operation
        self.re_class_reason = reason
1147804
public static boolean overrides(
      TypeElement type, Types types, String methodName, TypeMirror... params) {
    return override(type, types, methodName, params).isPresent();
  }
465830
def override(cls):
    

    def check_override(method):
        if method.__name__ not in dir(cls):
            raise NameError("{} does not override any method of {}".format(
                method, cls))
        return method

    return check_override
606088
@Override
    public void setOverriding(boolean b)
    {
        if (this.keyHook != null)
        {
            this.keyHook.isDown = false;
            this.keyHook.justPressed = false;
            this.keyHook.isOverridingPresses = b;
        }
    }
1225551
def accept_override(self):
        """"""
        conflicts = self.check_conflicts()
        if conflicts:
            for shortcut in conflicts:
                shortcut.key = ''
        self.accept()
337595
def monkey_patch_override_method(klass):
    
    def perform_override(override_fn):
        fn_name = override_fn.__name__
        original_fn_name = '_original_' + fn_name
        # Override class method, if it hasn't already been done
        if not hasattr(klass, original_fn_name):
            original_fn = getattr(klass, fn_name)
            setattr(klass, original_fn_name, original_fn)
            setattr(klass, fn_name, override_fn)
    return perform_override
247423
public function setClasses($classes, $override = true)
    {
        foreach ($classes as $key => $class) {
            if ($override || !isset($this->_classes[$key])) {
                $this->_classes[$key] = $class;
            }
        }
    }
1045023
public void setNodePropertyOverrides(java.util.Collection<NodePropertyOverride> nodePropertyOverrides) {
        if (nodePropertyOverrides == null) {
            this.nodePropertyOverrides = null;
            return;
        }

        this.nodePropertyOverrides = new java.util.ArrayList<NodePropertyOverride>(nodePropertyOverrides);
    }
162836
def kwargs(self):
        """"""
        # Subclasses must override this property if and only if they define
        # keyword-only arguments in their __init__ method
        if hasattr(self, '_has_kwargs') and self._has_kwargs:
            raise NotImplementedError(
                "Class %s does not provide a kwargs property"
                % str(self.__class__.__name__))
        return {}
1175306
public void addSubtype(String subtype) {
    if(!StringUtils.isBlank(subtype) && !subtypes.contains(subtype.trim())) {
      subtypes.add(subtype.trim());
    }
  }
426580
def get_subclasses(klass):
    
    stack = [klass]
    seen = set()
    while stack:
        klass = stack.pop()
        seen.add(klass)
        stack.extend(klass.__subclasses__())
    return seen