MCPcopy Index your code
hub / github.com/google/dagger / cast

Method cast

java/dagger/internal/codegen/CodeBlocks.java:110–112  ·  view source on GitHub ↗

Returns expression cast to a type.

(CodeBlock expression, Class<?> castTo)

Source from the content-addressed store, hash-verified

108
109 /** Returns {@code expression} cast to a type. */
110 static CodeBlock cast(CodeBlock expression, Class<?> castTo) {
111 return CodeBlock.of("($T) $L", castTo, expression);
112 }
113
114 private static final class CodeBlockJoiner {
115 private final String delimiter;

Callers 5

creationExpressionMethod · 0.95
creationExpressionMethod · 0.95
creationExpressionMethod · 0.95
creationExpressionMethod · 0.95
instancesOfMethod · 0.80

Calls 1

ofMethod · 0.45

Tested by

no test coverage detected