Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 3,055 for REFLECT (0.11 sec)

  1. test/escape_unsafe.go

    	return unsafe.Pointer(reflect.ValueOf(p).Elem().UnsafeAddr())
    }
    
    // (6) Conversion of a reflect.SliceHeader or reflect.StringHeader
    // Data field to or from Pointer.
    
    func fromSliceData(s []int) unsafe.Pointer { // ERROR "leaking param: s to result ~r0 level=0$"
    	return unsafe.Pointer((*reflect.SliceHeader)(unsafe.Pointer(&s)).Data)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 07 17:25:59 UTC 2022
    - 2.2K bytes
    - Viewed (0)
  2. pkg/printers/tablegenerator.go

    func (h *HumanReadableGenerator) GenerateTable(obj runtime.Object, options GenerateOptions) (*metav1.Table, error) {
    	t := reflect.TypeOf(obj)
    	handler, ok := h.handlerMap[t]
    	if !ok {
    		return nil, fmt.Errorf("no table handler registered for this type %v", t)
    	}
    
    	args := []reflect.Value{reflect.ValueOf(obj), reflect.ValueOf(options)}
    	results := handler.printFunc.Call(args)
    	if !results[1].IsNil() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 26 17:14:05 UTC 2022
    - 5.9K bytes
    - Viewed (0)
  3. platforms/core-runtime/base-asm/src/main/java/org/gradle/model/internal/asm/AsmClassGeneratorUtils.java

     */
    
    package org.gradle.model.internal.asm;
    
    import javax.annotation.Nonnull;
    import java.lang.reflect.Constructor;
    import java.lang.reflect.GenericArrayType;
    import java.lang.reflect.Method;
    import java.lang.reflect.ParameterizedType;
    import java.lang.reflect.Type;
    import java.lang.reflect.TypeVariable;
    import java.lang.reflect.WildcardType;
    
    import static org.objectweb.asm.Type.getType;
    
    public class AsmClassGeneratorUtils {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Apr 02 15:31:25 UTC 2024
    - 7K bytes
    - Viewed (0)
  4. test/fixedbugs/issue27695c.go

    func (t *T) Foo(e error) error {
    	runtime.GC()
    	return e
    }
    
    func main() {
    	// Functions
    	d := reflect.MakeFunc(reflect.TypeOf(func(e error) error { return e }),
    		func(args []reflect.Value) []reflect.Value {
    			runtime.GC()
    			return args
    		}).Interface().(func(error) error)
    	f(d)
    
    	// Methods
    	x := reflect.ValueOf(&T{}).Method(0).Interface().(func(error) error)
    	f(x)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 13 22:52:09 UTC 2018
    - 1.3K bytes
    - Viewed (0)
  5. schema/callbacks_test.go

    	}
    
    	for _, str := range []string{"BeforeSave", "AfterCreate"} {
    		if !reflect.Indirect(reflect.ValueOf(user)).FieldByName(str).Interface().(bool) {
    			t.Errorf("%v should be true", str)
    		}
    	}
    
    	for _, str := range []string{"BeforeCreate", "BeforeUpdate", "AfterUpdate", "AfterSave", "BeforeDelete", "AfterDelete", "AfterFind"} {
    		if reflect.Indirect(reflect.ValueOf(user)).FieldByName(str).Interface().(bool) {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Thu Jan 06 07:02:53 UTC 2022
    - 939 bytes
    - Viewed (0)
  6. platforms/core-configuration/kotlin-dsl/src/test/kotlin/org/gradle/kotlin/dsl/codegen/GradleApiExtensionsTest.kt

    import java.util.jar.JarEntry
    import java.util.jar.JarOutputStream
    import java.util.jar.Manifest
    import kotlin.reflect.KClass
    
    
    @LeaksFileHandles("embedded Kotlin compiler environment keepalive")
    class GradleApiExtensionsTest : TestWithClassPath() {
    
        @Test
        fun `maps java-lang-Class to kotlin-reflect-KClass`() {
    
            apiKotlinExtensionsGenerationFor(ClassToKClass::class) {
    
                assertGeneratedExtensions(
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Sun Nov 12 16:16:08 UTC 2023
    - 22.3K bytes
    - Viewed (0)
  7. src/encoding/xml/typeinfo.go

    // returns a zero reflect.Value.
    func (finfo *fieldInfo) value(v reflect.Value, shouldInitNilPointers bool) reflect.Value {
    	for i, x := range finfo.idx {
    		if i > 0 {
    			t := v.Type()
    			if t.Kind() == reflect.Pointer && t.Elem().Kind() == reflect.Struct {
    				if v.IsNil() {
    					if !shouldInitNilPointers {
    						return reflect.Value{}
    					}
    					v.Set(reflect.New(v.Type().Elem()))
    				}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 07 00:23:29 UTC 2023
    - 9.6K bytes
    - Viewed (0)
  8. platforms/core-configuration/kotlin-dsl/src/test/kotlin/org/gradle/kotlin/dsl/integration/GradleApiParameterNamesTest.kt

    import org.gradle.kotlin.dsl.PluginDependenciesSpecScope
    
    import org.hamcrest.CoreMatchers.equalTo
    import org.hamcrest.MatcherAssert.assertThat
    import org.junit.Test
    
    import kotlin.reflect.KClass
    import kotlin.reflect.full.declaredFunctions
    import kotlin.reflect.full.valueParameters
    
    
    class GradleApiParameterNamesTest {
    
        @Test
        fun `Kotlin delegation generated member has parameter names`() {
    
            assertHasParameterNames(
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Aug 02 08:06:49 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  9. src/vendor/golang.org/x/crypto/internal/alias/alias_purego.go

    // This is the Google App Engine standard variant based on reflect
    // because the unsafe package and cgo are disallowed.
    
    import "reflect"
    
    // AnyOverlap reports whether x and y share memory at any (not necessarily
    // corresponding) index. The memory beyond the slice length is ignored.
    func AnyOverlap(x, y []byte) bool {
    	return len(x) > 0 && len(y) > 0 &&
    		reflect.ValueOf(&x[0]).Pointer() <= reflect.ValueOf(&y[len(y)-1]).Pointer() &&
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/api/meta/help.go

    	if !items.IsValid() {
    		return nil, errExpectFieldItems
    	}
    	switch items.Kind() {
    	case reflect.Interface, reflect.Pointer:
    		target := reflect.TypeOf(items.Interface()).Elem()
    		if target.Kind() != reflect.Slice {
    			return nil, errExpectSliceItems
    		}
    		return items.Interface(), nil
    	case reflect.Slice:
    		return items.Addr().Interface(), nil
    	default:
    		return nil, errExpectSliceItems
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 29 16:25:43 UTC 2023
    - 9.8K bytes
    - Viewed (0)
Back to top