Lines Matching defs:target

34  * which is called its {@code target}.
36 * all calls to the site's current target.
46 * <li>If a mutable target is not required, an {@code invokedynamic} instruction
48 * <li>If a mutable target is required which has volatile variable semantics,
49 * because updates to the target must be immediately and reliably witnessed by other threads,
51 * <li>Otherwise, if a mutable target is required,
55 * A non-constant call site may be <em>relinked</em> by changing its target.
56 * The new target must have the same {@linkplain MethodHandle#type() type}
57 * as the previous target.
91 MethodHandle target; // Note: This field is known to the JVM. Do not change.
95 * An initial target method is supplied which will throw
99 * it is usually provided with a more useful target method,
105 target = type.invokers().uninitializedCallSite();
109 * Make a call site object equipped with an initial target method handle.
110 * @param target the method handle which will be the initial target of the call site
111 * @throws NullPointerException if the proposed target is null
114 CallSite(MethodHandle target) {
115 target.type(); // null check
116 this.target = target;
120 * Make a call site object equipped with an initial target method handle.
122 * @param createTargetHook a hook which will bind the call site to the target method handle
124 * or if the target returned by the hook is not of the given {@code targetType}
134 checkTargetChange(this.target, boundTarget);
135 this.target = boundTarget;
139 * Returns the type of this call site's target.
141 * The {@code setTarget} method enforces this invariant by refusing any new target that does
142 * not have the previous target's type.
143 * @return the type of the current target, which is also the type of any future target
147 return target.type();
151 * Returns the target method of the call site, according to the
156 * @return the current linkage state of the call site, its target method handle
167 * Updates the target method of this call site, according to the
172 * The type of the new target must be {@linkplain MethodType#equals equal to}
173 * the type of the old target.
175 * @param newTarget the new target
176 * @throws NullPointerException if the proposed new target is null
177 * @throws WrongMethodTypeException if the proposed new target
178 * has a method type that differs from the previous target
193 private static WrongMethodTypeException wrongTargetType(MethodHandle target, MethodType type) {
194 return new WrongMethodTypeException(String.valueOf(target)+" should be of type "+type);
209 * @return a method handle which always invokes this call site's current target
229 /** This guy is rolled into the default target if a MethodType is supplied to the constructor. */
239 TARGET_OFFSET = UNSAFE.objectFieldOffset(CallSite.class.getDeclaredField("target"));