| /external/python/cpython3/Lib/ |
| D | _py_abc.py | 29 # registered as a virtual subclass of anything. It forces the 54 def register(cls, subclass): argument 55 """Register a virtual subclass of an ABC. 57 Returns the subclass, to allow usage as a class decorator. 59 if not isinstance(subclass, type): 61 if issubclass(subclass, cls): 62 return subclass # Already a subclass 63 # Subtle: test for cycles *after* testing for "already a subclass"; 65 if issubclass(cls, subclass): 68 cls._abc_registry.add(subclass) [all …]
|
| /external/python/cpython2/Lib/ |
| D | abc.py | 82 # registered as a virtual subclass of anything. It forces the 105 def register(cls, subclass): argument 106 """Register a virtual subclass of an ABC.""" 107 if not isinstance(subclass, (type, types.ClassType)): 109 if issubclass(subclass, cls): 110 return # Already a subclass 111 # Subtle: test for cycles *after* testing for "already a subclass"; 113 if issubclass(cls, subclass): 116 cls._abc_registry.add(subclass) 131 subclass = getattr(instance, '__class__', None) [all …]
|
| /external/clang/test/SemaObjC/ |
| D | newproperty-class-method-1.m | 5 @interface Subclass interface 11 @implementation Subclass implementation 36 Subclass.magicNumber = 2 /*[Subclass setMagicNumber:2]*/; 37 if (Subclass.magicNumber != 0) 39 if (Subclass.magicNumber != 2) 41 Subclass.magicNumber += 3; 42 if (Subclass.magicNumber != 5) 44 Subclass.magicNumber -= 5; 45 if (Subclass.magicNumber != 0) 48 Subclass.fakeSetterNumber = 123; [all …]
|
| D | class-property-access.m | 26 @interface Subclass : RootClass @end interface 30 (void)Subclass.property; 32 (void)Subclass.method; 35 Subclass.property = 2; 37 Subclass.method = 4; 41 (void)Subclass.classMethod; 45 (void)[Subclass property]; 47 [Subclass method]; 49 [Subclass classMethod]; 53 [Subclass setProperty : 2]; [all …]
|
| /external/cronet/testing/rust_gtest_interop/ |
| D | rust_gtest_interop.h | 16 // testing::Test subclass T. Invoke this macro once for each subclass of 31 // except the test body which calls the Rust function. The Subclass must be 32 // `testing::Test`, or a subclass thereof. 33 template <class Subclass> 34 class RustTest : public Subclass { 36 explicit RustTest(void (&test_fn)(Subclass*)) : test_fn_(test_fn) { in RustTest() argument 37 static_assert(std::is_convertible_v<Subclass*, testing::Test*>, in RustTest() 38 "RustTest's Subclass parameter must be a testing::Test or a " in RustTest() 39 "subclass of it"); in RustTest() 45 void (&test_fn_)(Subclass*); [all …]
|
| /external/python/cpython3/Modules/ |
| D | _abc.c | 511 subclass: object 518 _abc__abc_register_impl(PyObject *module, PyObject *self, PyObject *subclass) in _abc__abc_register_impl() argument 521 if (!PyType_Check(subclass)) { in _abc__abc_register_impl() 525 int result = PyObject_IsSubclass(subclass, self); in _abc__abc_register_impl() 527 Py_INCREF(subclass); in _abc__abc_register_impl() 528 return subclass; /* Already a subclass. */ in _abc__abc_register_impl() 533 /* Subtle: test for cycles *after* testing for "already a subclass"; in _abc__abc_register_impl() 535 result = PyObject_IsSubclass(self, subclass); in _abc__abc_register_impl() 548 if (_add_to_weak_set(&impl->_abc_registry, subclass) < 0) { in _abc__abc_register_impl() 561 set_collection_flag_recursive((PyTypeObject *)subclass, collection_flag); in _abc__abc_register_impl() [all …]
|
| /external/dexmaker/dexmaker-mockito-inline-extended-tests/src/main/java/com/android/dx/mockito/inline/extended/tests/ |
| D | MockStatic.java | 66 private static final class SubClass extends SuperClass { class in MockStatic 160 MockitoSession session = mockitoSession().mockStatic(SubClass.class).startMocking(); in mockOverriddenStaticMethod() 163 assertNull(SubClass.returnB()); in mockOverriddenStaticMethod() 164 assertNull(SubClass.returnC()); in mockOverriddenStaticMethod() 170 when(SubClass.returnB()).thenReturn("fakeB"); in mockOverriddenStaticMethod() 171 when(SubClass.returnC()).thenReturn("fakeC"); in mockOverriddenStaticMethod() 174 assertEquals("fakeB", SubClass.returnB()); in mockOverriddenStaticMethod() 175 assertEquals("fakeC", SubClass.returnC()); in mockOverriddenStaticMethod() 185 assertEquals("superB", SubClass.returnB()); in mockOverriddenStaticMethod() 186 assertEquals("subC", SubClass.returnC()); in mockOverriddenStaticMethod() [all …]
|
| /external/openscreen/cast/streaming/ |
| D | expanded_value_base.h | 24 // the longest reasonable length of continuous system operation. Subclass is 26 // is used to provide operator overloads. The Subclass must friend this class 36 template <typename FullWidthInteger, class Subclass> 73 Subclass ExpandLessThanOrEqual(ShortUnsigned x) const { in ExpandLessThanOrEqual() 94 return Subclass(result); in ExpandLessThanOrEqual() 101 return Subclass(x); in ExpandLessThanOrEqual() 108 Subclass ExpandGreaterThan(ShortUnsigned x) const { in ExpandGreaterThan() 109 const Subclass maximum_possible_result( in ExpandGreaterThan() 120 Subclass Expand(ShortUnsigned x) const { in Expand() 121 const Subclass maximum_possible_result( in Expand() [all …]
|
| /external/auto/value/src/test/java/com/google/auto/value/extension/toprettystring/ |
| D | ToPrettyStringValidatorTest.java | 161 JavaFileObject subclass = in onlyOneToPrettyStringMethod_superclass() local 163 "test.Subclass", in onlyOneToPrettyStringMethod_superclass() 168 "class Subclass extends Superclass {", in onlyOneToPrettyStringMethod_superclass() 175 Compilation compilation = compile(superclass, subclass); in onlyOneToPrettyStringMethod_superclass() 182 "test.Subclass has multiple @ToPrettyString methods:", in onlyOneToPrettyStringMethod_superclass() 184 " - test.Subclass.toPretty2()")) in onlyOneToPrettyStringMethod_superclass() 185 .inFile(subclass) in onlyOneToPrettyStringMethod_superclass() 186 .onLineContaining("class Subclass"); in onlyOneToPrettyStringMethod_superclass() 205 JavaFileObject subclass = in onlyOneToPrettyStringMethod_superinterface() local 207 "test.Subclass", in onlyOneToPrettyStringMethod_superinterface() [all …]
|
| /external/kotlinx.serialization/formats/json-tests/commonTest/src/kotlinx/serialization/json/polymorphic/ |
| D | JsonProhibitedPolymorphicKindsTest.kt | 27 subclass(Base::class) in testSealedSubclass() 32 subclass(Base::class) in testSealedSubclass() 41 subclass(Int::class) in testPrimitive() 47 subclass(Int::class) in testPrimitive() 55 subclass(MyEnum::class) in testEnum() 60 subclass(MyEnum::class) in testEnum() 68 subclass(serializer<Map<Int, Int>>()) in testStructures() 74 subclass(serializer<List<Int>>()) in testStructures() 79 subclass(serializer<List<Int>>()) in testStructures() 84 subclass(serializer<Map<Int, Int>>()) in testStructures()
|
| /external/cronet/base/allocator/partition_allocator/src/partition_alloc/pointers/ |
| D | raw_ref_unittest.cc | 25 class SubClass : public BaseClass {}; class 92 // A SubClass can be converted to a BaseClass. 93 static_assert(std::is_constructible_v<raw_ref<BaseClass>, raw_ref<SubClass>>); 95 std::is_constructible_v<raw_ref<BaseClass>, const raw_ref<SubClass>&>); 96 static_assert(std::is_constructible_v<raw_ref<BaseClass>, raw_ref<SubClass>&&>); 97 static_assert(std::is_assignable_v<raw_ref<BaseClass>, raw_ref<SubClass>>); 99 std::is_assignable_v<raw_ref<BaseClass>, const raw_ref<SubClass>&>); 100 static_assert(std::is_assignable_v<raw_ref<BaseClass>, raw_ref<SubClass>&&>); 102 static_assert(!std::is_constructible_v<raw_ref<SubClass>, raw_ref<BaseClass>>); 104 !std::is_constructible_v<raw_ref<SubClass>, const raw_ref<BaseClass>&>); [all …]
|
| /external/python/cpython2/Doc/library/ |
| D | abc.rst | 45 .. method:: register(subclass) 47 Register *subclass* as a "virtual subclass" of this ABC. For 62 .. method:: __subclasshook__(subclass) 66 Check whether *subclass* is considered a subclass of this ABC. This means 69 subclass of the ABC. (This class method is called from the 73 it returns ``True``, the *subclass* is considered a subclass of this ABC. 74 If it returns ``False``, the *subclass* is not considered a subclass of 76 ``NotImplemented``, the subclass check is continued with the usual 123 Finally, the last line makes ``Foo`` a virtual subclass of ``MyIterable``, 170 A subclass of the built-in :func:`property`, indicating an abstract property.
|
| /external/clang/test/CodeGenObjC/ |
| D | default-property-synthesis.m | 4 // Superclass declares property. Subclass redeclares the same property. 5 // Do not @synthesize-by-default in the subclass. P1 6 // Superclass declares a property. Subclass declares a different property with the same name 7 // (such as different type or attributes). Do not @synthesize-by-default in the subclass. P2 8 // Superclass conforms to a protocol that declares a property. Subclass redeclares the 9 // same property. Do not @synthesize-by-default in the subclass. P3 10 // Superclass conforms to a protocol that declares a property. Subclass conforms to the 11 // same protocol or a derived protocol. Do not @synthesize-by-default in the subclass. P4
|
| /external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/IR/ |
| D | InstVisitor.h | 30 return static_cast<SubClass*>(this)-> \ 41 /// new type for the 'SubClass' template parameter, and "override" visitXXX 79 template<typename SubClass, typename RetTy=void> 91 static_cast<SubClass*>(this)->visit(*Start++); in visit() 97 static_cast<SubClass*>(this)->visitModule(M); in visit() 101 static_cast<SubClass*>(this)->visitFunction(F); in visit() 105 static_cast<SubClass*>(this)->visitBasicBlock(BB); in visit() 118 static_assert(std::is_base_of<InstVisitor, SubClass>::value, in visit() 126 static_cast<SubClass*>(this)-> \ in visit() 224 return static_cast<SubClass*>(this)->visitCallSite(&I); in visitCallInst() [all …]
|
| /external/bcc/src/lua/bcc/vendor/ |
| D | middleclass.lua | 53 for subclass in pairs(aClass.subclasses) do 54 if rawget(subclass.__declaredMethods, name) == nil then 55 _propagateInstanceMethod(subclass, name, f) 135 subclass = function(self, name) function 136 …type(self) == 'table', "Make sure that you are using 'Class:subclass' instead of 'Class.subclass'") 139 local subclass = _createClass(name, self) 142 _propagateInstanceMethod(subclass, methodName, f) 144 subclass.initialize = function(instance, ...) return self.initialize(instance, ...) end 146 self.subclasses[subclass] = true 147 self:subclassed(subclass) [all …]
|
| /external/auto/value/src/main/java/com/google/auto/value/processor/ |
| D | gwtserializer.vm | 40 extends `com.google.gwt.user.client.rpc.CustomFieldSerializer`<$subclass$actualTypes> { 42 public static $formalTypes $subclass$actualTypes instantiate( 53 ${subclass}.Builder${actualTypes} builder$ = new ${subclass}.Builder${actualTypes}(); 67 return (${subclass}${actualTypes}) builder$.build(); 70 return new ${subclass}$actualTypes( 78 … $subclass$actualTypes instance) throws `com.google.gwt.user.client.rpc.SerializationException` { 86 @SuppressWarnings("unused") $subclass$actualTypes instance) { 90 // This dummy field is a hash of the fields in ${subclass}. It will change if they do, including 99 $subclass$actualTypes instance) { 109 public $subclass$actualTypes instantiateInstance( [all …]
|
| /external/kotlinx.serialization/formats/json-tests/commonTest/src/kotlinx/serialization/modules/ |
| D | SerialNameCollisionTest.kt | 44 subclass(Derived.serializer()) in testCollisionWithDiscriminator() 57 subclass(Derived.serializer()) in testNoCollisionWithArrayPolymorphism() 67 subclass(DerivedCustomized.serializer()) in testCollisionWithDiscriminatorViaSerialNames() 83 subclass(Derived.serializer()) in testCollisionWithinHierarchy() 84 subclass(DerivedRenamed.serializer()) in testCollisionWithinHierarchy() 94 subclass(Derived.serializer()) in testCollisionWithinHierarchyViaConcatenation() 99 subclass(DerivedRenamed.serializer()) in testCollisionWithinHierarchyViaConcatenation() 110 subclass(Derived.serializer()) in testNoCollisionWithinHierarchy() 114 subclass(DerivedRenamed.serializer()) in testNoCollisionWithinHierarchy()
|
| /external/clang/test/Analysis/ |
| D | superclass.m | 100 } // expected-warning {{The 'addChildViewController:' instance method in UIViewController subclass … 101 …cted-warning {{The 'viewDidAppear:' instance method in UIViewController subclass 'TestB' is missin… 102 …d-warning {{The 'viewDidDisappear:' instance method in UIViewController subclass 'TestB' is missin… 103 …ected-warning {{The 'viewDidUnload' instance method in UIViewController subclass 'TestB' is missin… 104 …xpected-warning {{The 'viewDidLoad' instance method in UIViewController subclass 'TestB' is missin… 105 …cted-warning {{The 'viewWillUnload' instance method in UIViewController subclass 'TestB' is missin… 106 …ted-warning {{The 'viewWillAppear:' instance method in UIViewController subclass 'TestB' is missin… 107 …-warning {{The 'viewWillDisappear:' instance method in UIViewController subclass 'TestB' is missin… 108 …ing {{The 'didReceiveMemoryWarning' instance method in UIViewController subclass 'TestB' is missin… 109 …he 'removeFromParentViewController' instance method in UIViewController subclass 'TestB' is missin… [all …]
|
| /external/grpc-grpc/src/core/lib/gprpp/ |
| D | dual_ref_counted.h | 68 typename Subclass, 69 std::enable_if_t<std::is_base_of<Child, Subclass>::value, bool> = true> 70 RefCountedPtr<Subclass> RefAsSubclass() { in RefAsSubclass() 72 return RefCountedPtr<Subclass>( in RefAsSubclass() 73 DownCast<Subclass*>(static_cast<Child*>(this))); in RefAsSubclass() 76 typename Subclass, 77 std::enable_if_t<std::is_base_of<Child, Subclass>::value, bool> = true> 78 RefCountedPtr<Subclass> RefAsSubclass(const DebugLocation& location, in RefAsSubclass() 81 return RefCountedPtr<Subclass>( in RefAsSubclass() 82 DownCast<Subclass*>(static_cast<Child*>(this))); in RefAsSubclass() [all …]
|
| /external/gson/gson/src/test/java/com/google/gson/functional/ |
| D | TypeAdapterRuntimeTypeWrapperTest.java | 23 private static class Subclass extends Base { class in TypeAdapterRuntimeTypeWrapperTest 29 Base b = new Subclass(); 40 * prefer that over reflective adapter for Subclass for serialization. 59 * serialization should prefer reflective adapter for Subclass since 75 * delegate for Base over reflective adapter for Subclass. 101 * serialization should prefer reflective adapter for Subclass. 118 * {@code JsonSerializer} over reflective adapter for Subclass. 138 * When a {@link JsonDeserializer} is registered for Subclass, and a custom 140 * the reflective adapter for Subclass for backward compatibility (see 148 .registerTypeAdapter(Subclass.class, new JsonDeserializer<Subclass>() { in testJsonDeserializer_SubclassBackwardCompatibility() [all …]
|
| /external/python/cpython2/Lib/test/ |
| D | test_property.py | 37 class SubClass(BaseClass): class 41 """SubClass.getter""" 98 sub = SubClass() 106 sub = SubClass() 107 self.assertEqual(sub.__class__.spam.__doc__, "SubClass.getter") 134 """This is a subclass of property""" 137 """This is a subclass of property that defines __slots__""" 160 """spam wrapped in property subclass""" 164 "spam wrapped in property subclass") 173 """spam wrapped in property subclass""" [all …]
|
| /external/python/cpython3/Doc/library/ |
| D | abc.rst | 70 .. method:: register(subclass) 72 Register *subclass* as a "virtual subclass" of this ABC. For 86 Returns the registered subclass, to allow usage as a class decorator. 94 .. method:: __subclasshook__(subclass) 98 Check whether *subclass* is considered a subclass of this ABC. This means 101 subclass of the ABC. (This class method is called from the 105 it returns ``True``, the *subclass* is considered a subclass of this ABC. 106 If it returns ``False``, the *subclass* is not considered a subclass of 108 ``NotImplemented``, the subclass check is continued with the usual 154 Finally, the last line makes ``Foo`` a virtual subclass of ``MyIterable``, [all …]
|
| /external/python/cpython3/Modules/clinic/ |
| D | _abc.c.h | 50 "_abc_register($module, self, subclass, /)\n" 59 _abc__abc_register_impl(PyObject *module, PyObject *self, PyObject *subclass); 66 PyObject *subclass; in _abc__abc_register() local 72 subclass = args[1]; in _abc__abc_register() 73 return_value = _abc__abc_register_impl(module, self, subclass); in _abc__abc_register() 111 "_abc_subclasscheck($module, self, subclass, /)\n" 121 PyObject *subclass); 128 PyObject *subclass; in _abc__abc_subclasscheck() local 134 subclass = args[1]; in _abc__abc_subclasscheck() 135 return_value = _abc__abc_subclasscheck_impl(module, self, subclass); in _abc__abc_subclasscheck()
|
| /external/kotlinx.serialization/core/commonTest/src/kotlinx/serialization/modules/ |
| D | ModuleBuildersTest.kt | 106 subclass(PolyDerived.serializer()) in <lambda>() 109 subclass(PolyBase.serializer()) in <lambda>() 110 subclass(PolyDerived.serializer()) in <lambda>() 116 subclass(PolyBase::class) in <lambda>() 117 subclass(PolyDerived.serializer()) in <lambda>() 121 subclass(PolyBase.serializer()) in <lambda>() 122 subclass(PolyDerived::class) in <lambda>() 193 subclass(C::class, CSerializer) in <lambda>() 198 subclass(C::class, C.serializer()) in <lambda>() 213 subclass(C::class, C.serializer()) in <lambda>() [all …]
|
| /external/swiftshader/third_party/llvm-16.0/llvm/include/llvm/IR/ |
| D | InstVisitor.h | 28 return static_cast<SubClass*>(this)-> \ 39 /// new type for the 'SubClass' template parameter, and "override" visitXXX 77 template<typename SubClass, typename RetTy=void> 89 static_cast<SubClass*>(this)->visit(*Start++); in visit() 95 static_cast<SubClass*>(this)->visitModule(M); in visit() 99 static_cast<SubClass*>(this)->visitFunction(F); in visit() 103 static_cast<SubClass*>(this)->visitBasicBlock(BB); in visit() 116 static_assert(std::is_base_of<InstVisitor, SubClass>::value, in visit() 124 static_cast<SubClass*>(this)-> \ in visit() 227 return static_cast<SubClass *>(this)->visitTerminator(I); in visitReturnInst() [all …]
|