Lines Matching defs:Lookup

46  * <li>Lookup methods which help create method handles for methods and fields.
65 * Returns a {@link Lookup lookup object} on the caller,
72 public static Lookup lookup() {
73 return new Lookup(Reflection.getCallerClass());
77 * Returns a {@link Lookup lookup object} which is trusted minimally.
81 * As a matter of pure convention, the {@linkplain Lookup#lookupClass lookup class}
85 * {@linkplain Lookup#in <code>publicLookup().in(C.class)</code>}.
89 public static Lookup publicLookup() {
90 return Lookup.PUBLIC_LOOKUP;
105 * When the {@code Lookup} factory object is created, the identity of the lookup class is
106 * determined, and securely stored in the {@code Lookup} object.
108 * on the {@code Lookup} object to create method handles for access-checked members.
112 * The factory methods on a {@code Lookup} object correspond to all major
120 * <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findGetter lookup.findGetter(C.class,"f",FT.class)}</td>
124 * <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findStaticGetter lookup.findStaticGetter(C.class,"f",FT.class)}</td>
128 * <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findSetter lookup.findSetter(C.class,"f",FT.class)}</td>
132 * <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findStaticSetter lookup.findStaticSetter(C.class,"f",FT.class)}</td>
136 * <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findVirtual lookup.findVirtual(C.class,"m",MT)}</td>
140 * <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findStatic lookup.findStatic(C.class,"m",MT)}</td>
144 * <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findSpecial lookup.findSpecial(C.class,"m",MT,this.class)}</td>
148 * <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#findConstructor lookup.findConstructor(C.class,MT)}</td>
152 * <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#unreflectGetter lookup.unreflectGetter(aField)}</td>
156 * <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#unreflectSetter lookup.unreflectSetter(aField)}</td>
160 * <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#unreflect lookup.unreflect(aMethod)}</td>
164 * <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#unreflectConstructor lookup.unreflectConstructor(aConstructor)}</td>
168 * <td>{@linkplain java.lang.invoke.MethodHandles.Lookup#unreflect lookup.unreflect(aMethod)}</td>
211 * Access checks are applied in the factory methods of {@code Lookup},
217 * All access checks start from a {@code Lookup} object, which
220 * A single {@code Lookup} object can be used to create any number
224 * A {@code Lookup} object can be shared with other trusted code,
226 * A shared {@code Lookup} object delegates the capability
228 * Even if privileged code uses the {@code Lookup} object,
271 * those related classes. In such cases, a {@code Lookup} object on
273 * A workaround for this limitation is the {@link Lookup#in Lookup.in} method,
285 * These checks apply to both the {@code MethodHandles.Lookup} API
295 * independently of any {@code Lookup} object.
337 class Lookup {
408 * {@linkplain java.lang.invoke.MethodHandles.Lookup#in created from a previous lookup object}
427 Lookup(Class<?> lookupClass) {
432 private Lookup(Class<?> lookupClass, int allowedModes) {
442 * However, the resulting {@code Lookup} object is guaranteed
461 public Lookup in(Class<?> requestedLookupClass) {
464 return new Lookup(requestedLookupClass, ALL_MODES);
484 return new Lookup(requestedLookupClass, newModes);
494 static final Lookup PUBLIC_LOOKUP = new Lookup(Object.class, PUBLIC);
497 static final Lookup IMPL_LOOKUP = new Lookup(Object.class, TRUSTED);
523 * Objects created by {@link java.lang.invoke.MethodHandles.Lookup#in Lookup.in}
579 * <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
629 * <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
674 * <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
715 * <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
721 Lookup specialLookup = this.in(specialCaller);
741 * <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
764 * <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
786 * <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
808 * <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
860 * <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
898 Lookup lookup = m.isAccessible() ? IMPL_LOOKUP : this;
925 Lookup specialLookup = this.in(specialCaller);
957 Lookup lookup = c.isAccessible() ? IMPL_LOOKUP : this;
983 Lookup lookup = f.isAccessible() ? IMPL_LOOKUP : this;
1066 * Perform necessary <a href="MethodHandles.Lookup.html#secmgr">access checks</a>.