Used by subclasses
514269
protected void common_invalidate(Object key, boolean waitOnInvalidation, boolean checkPreInvalidationListener) {
        ValidateUtility.objectNotNull(key, "key");
        cache.invalidateById(key, waitOnInvalidation, checkPreInvalidationListener);
    }
1257508
def register_subclass(cls, typeid):
        
        def decorator(subclass):
            cls._subcls_lookup[typeid] = subclass
            subclass.typeid = typeid
            return subclass
        return decorator
285806
def doit(self, classes=None, recursive=True, **kwargs):
        
        return super().doit(classes, recursive, **kwargs)
286015
public static boolean isSubclass(Class a, Class b) {
		if (a == b)
			return false;
		if (!(b.isAssignableFrom(a)))
			return false;
		return true;
	}
273024
def _forgiving_issubclass(derived_class, base_class):
    
    return (type(derived_class) is ClassType and \
            type(base_class) is ClassType and \
            issubclass(derived_class, base_class))
1205
def sub_types
      # Iterate through the Google::Protobuf::FieldDescriptor list
      entries.map do |fd|
        # fd.name = 'current_entity_to_update'
        # fd.number = 1
        # fd.label = :optional
        # fd.submsg_name = "com.foo.bar.Baz"
        # fd.subtype = #<Google::Protobuf::Descriptor:0x007fabb3947f08>
        if fd.subtype.class == Google::Protobuf::Descriptor
          # There is a subtype; recurse
          [name, fd.submsg_name] + fd.subtype.sub_types
        else
          [name, fd.submsg_name]
        end
      end.flatten.compact
    end
703450
def ensure_subclass(value, types):
    
    ensure_class(value)
    if not issubclass(value, types):
        raise TypeError(
            "expected subclass of {}, not {}".format(
                types, value))
1040570
def all_subclasses(cls):
    
    subclasses = cls.__subclasses__()
    descendants = (descendant for subclass in subclasses
                   for descendant in all_subclasses(subclass))
    return set(subclasses) | set(descendants)
438976
def version(*list, inherit_from: nil, &block)
      superclass = self[inherit_from] || self
      subclass   = Class.new(superclass, &block)
      list.each { |v| versions[v] = subclass }
    end
414975
public void addSubtypes(NamedType... subtypes) {

    if (this.subtypeList == null) {
      this.subtypeList = new ArrayList<>();
    }
    this.subtypeList.addAll(Arrays.asList(subtypes));
  }
1362417
def subclass(self, namedstruct):
        '''
        
        '''
        cp = self
        cs = namedstruct
        while True:
            if hasattr(cs, '_sub'):
                cs = cs._sub
                cp = cs._parser
                continue
            subp = None
            clsfr = getattr(cp, 'classifier', None)
            if clsfr is not None:
                clsvalue = clsfr(namedstruct)
                subp = cp.subindices.get(clsvalue)
            if subp is None:
                for sc in cp.subclasses:
                    if sc.isinstance(namedstruct):
                        subp = sc
                        break
            if subp is None:
                break
            cs._subclass(subp)
            cs = cs._sub
            cp = subp
109538
def define_sub_elements(model_class, submodel_class, props = [])
      attributes = submodel_class.new.attributes.keys

      props = attributes if props.empty?
      props.map! { |x| x.to_s } unless props.empty?

      attributes.each do |attri|
        if props.include?(attri)
          selector = '#' + "#{class_name(model_class)}_#{class_name(submodel_class)}_attributes_#{attri.to_s}"

          element attri, selector
        end
      end
    end
529865
def get_subclass(cls, name):
        
        for subclass in cls.__subclasses__():
            if subclass.name == name:
                return subclass
        raise NameError("Not a valid Benchmark class: " + name)
643521
private Collection<TypeElement> subclasses(TypeElement te) {
        Collection<TypeElement> ret = classToSubclass.get(te);
        if (ret == null) {
            ret = new TreeSet<>(utils.makeClassUseComparator());
            Set<TypeElement> subs = classtree.subClasses(te);
            if (subs != null) {
                ret.addAll(subs);
                for (TypeElement sub : subs) {
                    ret.addAll(subclasses(sub));
                }
            }
            addAll(classToSubclass, te, ret);
        }
        return ret;
    }
1276348
def inherited(subclass)
      subclass._arguments = []
      subclass._description = ''
      subclass._abstract = false
      subclass._skip_options = false
      subclass._exe_name = @_exe_name
      subclass._default_priority = @_default_priority.to_f / 2
      subclass._priority = 0
      super
    end
1054749
def is_direct_subclass(class_, of):
    
    ensure_class(class_)
    ensure_class(of)  # TODO(xion): support predicates in addition to classes

    return of in class_.__bases__
610613
private Collection<TypeElement> subinterfaces(TypeElement te) {
        Collection<TypeElement> ret = classToSubinterface.get(te);
        if (ret == null) {
            ret = new TreeSet<>(utils.makeClassUseComparator());
            Set<TypeElement> subs = classtree.subInterfaces(te);
            if (subs != null) {
                ret.addAll(subs);
                for (TypeElement sub : subs) {
                    ret.addAll(subinterfaces(sub));
                }
            }
            addAll(classToSubinterface, te, ret);
        }
        return ret;
    }