Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for IsNamedType (0.19 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/httpresponse/httpresponse.go

    		id, ok := fun.X.(*ast.Ident)
    		return ok && id.Name == "http" // function in net/http package.
    	}
    
    	if analysisutil.IsNamedType(typ, "net/http", "Client") {
    		return true // method on http.Client.
    	}
    	ptr, ok := aliases.Unalias(typ).(*types.Pointer)
    	return ok && analysisutil.IsNamedType(ptr.Elem(), "net/http", "Client") // method on *http.Client.
    }
    
    // restOfBlock, given a traversal stack, finds the innermost containing
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 5K bytes
    - Viewed (0)
  2. platforms/core-configuration/model-core/src/main/java/org/gradle/model/internal/inspect/StructNodeInitializer.java

                    && !(propertySchema instanceof ScalarCollectionSchema);
        }
    
        private <P> boolean isNamePropertyOfANamedType(ManagedProperty<P> property) {
            return isNamedType() && "name".equals(property.getName());
        }
    
        private boolean isNamedType() {
            return Named.class.isAssignableFrom(bindings.getPublicSchema().getType().getRawClass());
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 9.7K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unsafeptr/unsafeptr.go

    		if len(x.Args) != 0 {
    			break
    		}
    		sel, ok := x.Fun.(*ast.SelectorExpr)
    		if !ok {
    			break
    		}
    		switch sel.Sel.Name {
    		case "Pointer", "UnsafeAddr":
    			if analysisutil.IsNamedType(info.Types[sel.X].Type, "reflect", "Value") {
    				return true
    			}
    		}
    	}
    
    	// "(3) Conversion of a Pointer to a uintptr and back, with arithmetic."
    	return isSafeArith(info, x)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/internal/analysisutil/util.go

    		if imp.Path() == path {
    			return true
    		}
    	}
    	return false
    }
    
    // IsNamedType reports whether t is the named type with the given package path
    // and one of the given names.
    // This function avoids allocating the concatenation of "pkg.Name",
    // which is important for the performance of syntax matching.
    func IsNamedType(t types.Type, pkgPath string, names ...string) bool {
    	n, ok := aliases.Unalias(t).(*types.Named)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/timeformat/timeformat.go

    	if f.Name() != "Format" || f.Pkg() == nil || f.Pkg().Path() != "time" {
    		return false
    	}
    	// Verify that the receiver is time.Time.
    	recv := f.Type().(*types.Signature).Recv()
    	return recv != nil && analysisutil.IsNamedType(recv.Type(), "time", "Time")
    }
    
    func isTimeDotParse(f *types.Func) bool {
    	return analysisutil.IsFunctionNamed(f, "time", "Parse")
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/slog/slog.go

    			} else {
    				pass.ReportRangef(call, "call to %s has a missing or misplaced value", shortName(fn))
    			}
    		}
    	})
    	return nil, nil
    }
    
    func isAttr(t types.Type) bool {
    	return analysisutil.IsNamedType(t, "log/slog", "Attr")
    }
    
    // shortName returns a name for the function that is shorter than FullName.
    // Examples:
    //
    //	"slog.Info" (instead of "log/slog.Info")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 7.2K bytes
    - Viewed (0)
Back to top