8139282: Remove @author and @id tags from Dynalink JavaDoc; some minor edits

Reviewed-by: mhaupt, sundar
This commit is contained in:
Attila Szegedi 2015-10-12 14:52:47 +02:00
parent 89fa209a47
commit d546e9e360
48 changed files with 23 additions and 102 deletions

View File

@ -96,8 +96,6 @@ import jdk.internal.dynalink.support.CallSiteDescriptorFactory;
* guarding linkers so they aren't tempted to directly manipulate the call sites. The constructors of built-in
* {@link RelinkableCallSite} implementations all need a call site descriptor. Even if you create your own call site
* descriptors consider using {@link CallSiteDescriptorFactory#tokenizeName(String)} in your implementation.
*
* @author Attila Szegedi
*/
public interface CallSiteDescriptor {
/**
@ -157,7 +155,9 @@ public interface CallSiteDescriptor {
public MethodType getMethodType();
/**
* Returns the lookup passed to the bootstrap method.
* Returns the lookup passed to the bootstrap method. If the lookup isn't the public lookup, the
* implementation must check the {@code RuntimePermission("dynalink.getLookup")} permission if a security
* manager is present.
* @return the lookup passed to the bootstrap method.
*/
public Lookup getLookup();

View File

@ -97,8 +97,6 @@ import jdk.internal.dynalink.support.CallSiteDescriptorFactory;
* and one that just uses the passed caller as the lookup scope. Using the public lookup one is advised if your language
* runtime has no concept of interacting with Java visibility scopes, as it results in a more lightweight runtime
* information.
*
* @author Attila Szegedi
*/
public class DefaultBootstrapper {
private static final DynamicLinker dynamicLinker = new DynamicLinkerFactory().createLinker();

View File

@ -147,8 +147,6 @@ import jdk.internal.dynalink.support.RuntimeContextLinkRequestImpl;
* additional parameters to the bootstrap method) to them.</li>
*
* </ul>
*
* @author Attila Szegedi
*/
public final class DynamicLinker {
private static final String CLASS_NAME = DynamicLinker.class.getName();

View File

@ -111,12 +111,11 @@ import jdk.internal.dynalink.support.TypeConverterFactory;
import jdk.internal.dynalink.support.TypeUtilities;
/**
* A factory class for creating {@link DynamicLinker}s. The most usual dynamic linker is a linker that is a composition
* of all {@link GuardingDynamicLinker}s known and pre-created by the caller as well as any
* {@link AutoDiscovery automatically discovered} guarding linkers and the standard fallback {@link BeansLinker} and a
* {@link DefaultPrelinkFilter}. See {@link DynamicLinker} documentation for tips on how to use this class.
*
* @author Attila Szegedi
* A factory class for creating {@link DynamicLinker}s. The usual dynamic linker is a linker composed of all
* {@link GuardingDynamicLinker}s known and pre-created by the caller as well as any
* {@link AutoDiscovery automatically discovered} guarding linkers and the standard fallback
* {@link BeansLinker} and a {@link DefaultPrelinkFilter}. See {@link DynamicLinker} documentation for tips on
* how to use this class.
*/
public final class DynamicLinkerFactory {
/**

View File

@ -91,8 +91,6 @@ import jdk.internal.dynalink.support.AbstractRelinkableCallSite;
* A relinkable call site that implements monomorphic inline caching strategy. After it linked a method, it will keep it
* until either its guard evaluates to false, or its switchpoint is invalidated, at which time it will throw away the
* previous linkage, and trigger relinking with its associated {@link DynamicLinker}.
*
* @author Attila Szegedi
*/
public class MonomorphicCallSite extends AbstractRelinkableCallSite {
/**

View File

@ -87,8 +87,6 @@ import jdk.internal.dynalink.linker.GuardingDynamicLinker;
/**
* Thrown at the invocation if the call site can not be linked by any available {@link GuardingDynamicLinker}.
*
* @author Attila Szegedi
*/
public class NoSuchDynamicMethodException extends RuntimeException {
private static final long serialVersionUID = 1L;

View File

@ -96,13 +96,11 @@ import jdk.internal.dynalink.linker.GuardedInvocation;
* {@link ChainedCallSite} that retains a chain of already linked method handles. The reason this is defined as an
* interface instead of a concrete, albeit abstract class is that it allows independent implementations to choose
* between {@link MutableCallSite} and {@link VolatileCallSite} as they see fit.
*
* @author Attila Szegedi
*/
public interface RelinkableCallSite {
/**
* Initializes the relinkable call site by setting a relink-and-invoke method handle. The call site implementation
* is supposed to set this method handle as its target.
* Initializes the relinkable call site by setting a relink-and-invoke method handle. The call site
* implementation is supposed to set this method handle as its target.
* @param relinkAndInvoke a relink-and-invoke method handle supplied by the {@link DynamicLinker}.
*/
public void initialize(MethodHandle relinkAndInvoke);

View File

@ -111,8 +111,6 @@ import jdk.internal.dynalink.support.TypeUtilities;
/**
* A base class for both {@link StaticClassLinker} and {@link BeanLinker}. Deals with common aspects of property
* exposure and method calls for both static and instance facets of a class.
*
* @author Attila Szegedi
*/
abstract class AbstractJavaLinker implements GuardingDynamicLinker {

View File

@ -98,8 +98,6 @@ import java.util.Set;
* public, or belongs to a restricted-access package. In that case, it is required to lookup a member in a publicly
* accessible superclass or implemented interface of the class, and use it instead of the member discovered on the
* class.
*
* @author Attila Szegedi
*/
class AccessibleMembersLookup {
private final Map<MethodSignature, Method> methods;
@ -140,8 +138,6 @@ class AccessibleMembersLookup {
/**
* A helper class that represents a method signature - name and argument types.
*
* @author Attila Szegedi
*/
static final class MethodSignature {
private final String name;

View File

@ -90,8 +90,6 @@ import jdk.internal.dynalink.support.TypeUtilities;
/**
* Represents overloaded methods applicable to a specific call site signature.
*
* @author Attila Szegedi
*/
class ApplicableOverloadedMethods {
private final List<SingleDynamicMethod> methods;

View File

@ -102,8 +102,6 @@ import jdk.internal.dynalink.support.TypeUtilities;
/**
* A class that provides linking capabilities for a single POJO class. Normally not used directly, but managed by
* {@link BeansLinker}.
*
* @author Attila Szegedi
*/
class BeanLinker extends AbstractJavaLinker implements TypeBasedGuardingDynamicLinker {
BeanLinker(final Class<?> clazz) {
@ -316,8 +314,6 @@ class BeanLinker extends AbstractJavaLinker implements TypeBasedGuardingDynamicL
/**
* Contains methods to adapt an item getter/setter method handle to the requested type, optionally binding it to a
* fixed key first.
* @author Attila Szegedi
* @version $Id: $
*/
private static class Binder {
private final LinkerServices linkerServices;

View File

@ -125,8 +125,6 @@ import jdk.internal.dynalink.linker.TypeBasedGuardingDynamicLinker;
* <p><strong>Variable argument invocation</strong> is handled for both methods and constructors.</p>
* <p>Currently, only public fields and methods are supported. Any Lookup objects passed in the
* {@link LinkRequest}s are ignored and {@link MethodHandles#publicLookup()} is used instead.</p>
*
* @author Attila Szegedi
*/
public class BeansLinker implements GuardingDynamicLinker {
private static final ClassValue<TypeBasedGuardingDynamicLinker> linkers = new ClassValue<TypeBasedGuardingDynamicLinker>() {

View File

@ -98,8 +98,6 @@ import jdk.internal.dynalink.support.Lookup;
* caller sensitive, it doesn't cache a method handle but rather uses the passed lookup object in
* {@link #getTarget(java.lang.invoke.MethodHandles.Lookup)} to unreflect a method handle from the reflective member on
* every request.
*
* @author Attila Szegedi
*/
class CallerSensitiveDynamicMethod extends SingleDynamicMethod {
// Typed as "AccessibleObject" as it can be either a method or a constructor.

View File

@ -93,7 +93,6 @@ import jdk.internal.dynalink.support.Lookup;
* A linker for java.lang.Class objects. Provides a synthetic property "static" that allows access to static fields and
* methods on the class (respecting property getter/setter conventions). Note that Class objects are not recognized by
* the Dynalink as constructors for the instances of the class, {@link StaticClass} is used for this purpose.
* @author Attila Szegedi
*/
class ClassLinker extends BeanLinker {

View File

@ -92,8 +92,9 @@ import jdk.internal.dynalink.support.Guards;
import jdk.internal.dynalink.support.TypeUtilities;
/**
*
* @author Attila Szegedi
* Represents a sequence of {@link Class} objects, useful for representing method signatures. Provides value
* semantics for using them as map keys, as well as specificity calculations and applicability checks as per
* JLS.
*/
final class ClassString {
/**

View File

@ -93,8 +93,6 @@ import jdk.internal.dynalink.linker.LinkerServices;
* overloaded methods will perform overload resolution (actually, it will perform partial overloaded resolution at link
* time, but if that fails to identify exactly one target method, it will generate a method handle that will perform the
* rest of the overload resolution at invocation time for actual argument types).
*
* @author Attila Szegedi
*/
abstract class DynamicMethod {
private final String name;

View File

@ -97,7 +97,6 @@ import jdk.internal.dynalink.support.Lookup;
/**
* Base for classes that expose class field and method information to an {@link AbstractJavaLinker}. There are
* subclasses for instance (bean) and static facet of a class.
* @author Attila Szegedi
*/
abstract class FacetIntrospector {
private final Class<?> clazz;

View File

@ -91,8 +91,6 @@ import jdk.internal.dynalink.linker.GuardedInvocation;
* {@link AbstractJavaLinker}. In addition to holding a guarded invocation, it holds semantic information about its
* guard. All guards produced in the AbstractJavaLinker are either "Class.isInstance()" or "getClass() == clazz"
* expressions. This allows choosing the most restrictive guard as the guard for the composition of two components.
* @author Attila Szegedi
* @version $Id: $
*/
class GuardedInvocationComponent {
enum ValidationType {

View File

@ -94,8 +94,6 @@ import jdk.internal.dynalink.support.TypeUtilities;
/**
* Utility class that encapsulates the algorithm for choosing the maximally specific methods.
*
* @author Attila Szegedi
*/
class MaximallySpecific {
/**

View File

@ -101,8 +101,6 @@ import jdk.internal.dynalink.support.TypeUtilities;
* Represents a group of {@link SingleDynamicMethod} objects that represents all overloads of a particular name (or all
* constructors) for a particular class. Correctly handles overload resolution, variable arity methods, and caller
* sensitive methods within the overloads.
*
* @author Attila Szegedi
*/
class OverloadedDynamicMethod extends DynamicMethod {
/**

View File

@ -100,8 +100,6 @@ import jdk.internal.dynalink.support.TypeUtilities;
* a vararg subset depending on the subclass. The method is for a fixed number of arguments though (as it is generated
* for a concrete call site). As such, all methods in the subset can be invoked with the specified number of arguments
* (exactly matching for fixargs, or having less than or equal fixed arguments, for varargs).
*
* @author Attila Szegedi
*/
class OverloadedMethod {
private final Map<ClassString, MethodHandle> argTypesToMethods = new ConcurrentHashMap<>();
@ -122,7 +120,7 @@ class OverloadedMethod {
fixArgMethods = new ArrayList<>(methodHandles.size());
varArgMethods = new ArrayList<>(methodHandles.size());
final int argNum = callSiteType.parameterCount();
for(MethodHandle mh: methodHandles) {
for(final MethodHandle mh: methodHandles) {
if(mh.isVarargsCollector()) {
final MethodHandle asFixed = mh.asFixedArity();
if(argNum == asFixed.type().parameterCount()) {

View File

@ -93,8 +93,6 @@ import java.lang.invoke.MethodType;
* {@link #getTarget(Lookup)}. Can be used in general to represents dynamic methods bound to a single method handle,
* even if that handle is not mapped to a Java method, i.e. as a wrapper around field getters/setters, array element
* getters/setters, etc.
*
* @author Attila Szegedi
*/
class SimpleDynamicMethod extends SingleDynamicMethod {
private final MethodHandle target;

View File

@ -97,7 +97,6 @@ import jdk.internal.dynalink.support.Lookup;
* Base class for dynamic methods that dispatch to a single target Java method or constructor. Handles adaptation of the
* target method to a call site type (including mapping variable arity methods to a call site signature with different
* arity).
* @author Attila Szegedi
*/
abstract class SingleDynamicMethod extends DynamicMethod {

View File

@ -99,7 +99,6 @@ import jdk.internal.dynalink.support.Lookup;
/**
* Provides a linker for the {@link StaticClass} objects.
* @author Attila Szegedi
*/
class StaticClassLinker implements TypeBasedGuardingDynamicLinker {
private static final ClassValue<SingleClassStaticsLinker> linkers = new ClassValue<SingleClassStaticsLinker>() {

View File

@ -90,15 +90,17 @@ package jdk.internal.dynalink.linker;
* of additional conversions. The static way of selecting the "most specific" method will fail more often, because there
* will be multiple maximally specific method with unrelated signatures. In these cases, language runtimes can be asked
* to resolve the ambiguity by expressing preferences for one conversion over the other.
* @author Attila Szegedi
*/
public interface ConversionComparator {
/**
* Enumeration of possible outcomes of comparing one conversion to another.
*/
enum Comparison {
/** The conversions cannot be compared. **/
INDETERMINATE,
/** The first conversion is better than the second one. **/
TYPE_1_BETTER,
/** The second conversion is better than the first one. **/
TYPE_2_BETTER,
}

View File

@ -101,8 +101,6 @@ import jdk.internal.dynalink.support.Guards;
* external invalidation of the invocation handle. The invocation handle is suitable for invocation if the guard
* handle returns true for its arguments, and as long as the switch point is not invalidated. Both the guard and the
* switch point are optional; neither, one, or both can be present.
*
* @author Attila Szegedi
*/
public class GuardedInvocation {
private final MethodHandle invocation;

View File

@ -89,8 +89,6 @@ package jdk.internal.dynalink.linker;
* very least, it depends on the receiver belonging to the language runtime of the linker). Language runtime
* implementors will normally implement one for their own language, and declare it in the
* <tt>META-INF/services/jdk.internal.dynalink.linker.GuardingDynamicLinker</tt> file within their JAR file.
*
* @author Attila Szegedi
*/
public interface GuardingDynamicLinker {
/**

View File

@ -91,8 +91,6 @@ import jdk.internal.dynalink.support.TypeUtilities;
* very likely want to implement {@link ConversionComparator} interface too, as your additional language-specific
* conversions, in absence of a strategy for prioritizing these conversions, will cause more ambiguity in selecting the
* correct overload when trying to link to an overloaded POJO method.
*
* @author Attila Szegedi
*/
public interface GuardingTypeConverterFactory {
/**

View File

@ -89,8 +89,6 @@ import jdk.internal.dynalink.DynamicLinkerFactory;
/**
* Represents a request to link a particular invocation at a particular call site. Instances of these requests are being
* passed to {@link GuardingDynamicLinker}.
*
* @author Attila Szegedi
*/
public interface LinkRequest {
/**

View File

@ -95,8 +95,6 @@ import jdk.internal.dynalink.support.TypeUtilities;
* Interface for services provided to {@link GuardingDynamicLinker} instances by the {@link DynamicLinker} that owns
* them. You can think of it as the interface of the {@link DynamicLinker} that faces the {@link GuardingDynamicLinker}
* s.
*
* @author Attila Szegedi
*/
public interface LinkerServices {
/**

View File

@ -88,8 +88,6 @@ package jdk.internal.dynalink.linker;
* argument at linking invocation time. (The first argument is usually the receiver class). Most language-specific
* linkers will fall into this category, as they recognize their native objects as Java objects of classes implementing
* a specific language-native interface or superclass. The linker mechanism can optimize the dispatch for these linkers.
*
* @author Attila Szegedi
*/
public interface TypeBasedGuardingDynamicLinker extends GuardingDynamicLinker {
/**

View File

@ -91,7 +91,6 @@ import jdk.internal.dynalink.CallSiteDescriptor;
/**
* A base class for call site descriptor implementations. Provides reconstruction of the name from the tokens, as well
* as a generally useful {@code equals} and {@code hashCode} methods.
* @author Attila Szegedi
*/
public abstract class AbstractCallSiteDescriptor implements CallSiteDescriptor {

View File

@ -90,8 +90,6 @@ import jdk.internal.dynalink.RelinkableCallSite;
/**
* A basic implementation of the {@link RelinkableCallSite} as a {@link MutableCallSite} subclass.
*
* @author Attila Szegedi
*/
public abstract class AbstractRelinkableCallSite extends MutableCallSite implements RelinkableCallSite {
private final CallSiteDescriptor descriptor;

View File

@ -91,8 +91,6 @@ import jdk.internal.dynalink.linker.TypeBasedGuardingDynamicLinker;
/**
* A linker that can't link any call site. Only used internally by {@link CompositeTypeBasedGuardingDynamicLinker}. Can
* be used by other language runtimes if they need it though.
*
* @author Attila Szegedi
*/
public class BottomGuardingDynamicLinker implements TypeBasedGuardingDynamicLinker {

View File

@ -97,12 +97,12 @@ import java.util.WeakHashMap;
import jdk.internal.dynalink.CallSiteDescriptor;
/**
* Usable as a default factory for call site descriptor implementations. It is weakly canonicalizing, meaning it will
* return the same immutable call site descriptor for identical inputs, i.e. repeated requests for a descriptor
* signifying public lookup for "dyn:getProp:color" of type "Object(Object)" will return the same object as long as
* a previously created, at least softly reachable one exists. It also uses several different implementations of the
* {@link CallSiteDescriptor} internally, and chooses the most space-efficient one based on the input.
* @author Attila Szegedi
* Usable as a default factory for call site descriptor implementations. It is weakly canonicalizing, meaning
* it will return the same immutable call site descriptor for identical inputs, i.e. repeated requests for a
* descriptor signifying public lookup for {@code "dyn:getProp:color"} of type {@code Object(Object)} will
* return the same object as long as a previously created, at least softly reachable one exists. It also uses
* several different implementations of the {@link CallSiteDescriptor} internally, and chooses the most
* space-efficient one based on the input.
*/
public class CallSiteDescriptorFactory {
private static final WeakHashMap<CallSiteDescriptor, Reference<CallSiteDescriptor>> publicDescs =

View File

@ -96,7 +96,6 @@ import java.util.concurrent.ConcurrentMap;
* A dual map that can either strongly or weakly reference a given class depending on whether the class is visible from
* a class loader or not.
*
* @author Attila Szegedi
* @param <T> the type of the values in the map
*/
public abstract class ClassMap<T> {

View File

@ -95,8 +95,6 @@ import jdk.internal.dynalink.linker.LinkerServices;
* A {@link GuardingDynamicLinker} that delegates sequentially to a list of other guarding dynamic linkers. The first
* value returned from a component linker other than null is returned. If no component linker returns an invocation,
* null is returned.
*
* @author Attila Szegedi
*/
public class CompositeGuardingDynamicLinker implements GuardingDynamicLinker, Serializable {

View File

@ -98,8 +98,6 @@ import jdk.internal.dynalink.linker.TypeBasedGuardingDynamicLinker;
* are queried sequentially on their {@link TypeBasedGuardingDynamicLinker#canLinkType(Class)} method. The linkers
* returning true are then bound to the class, and next time a receiver of same type is encountered, the linking is
* delegated to those linkers only, speeding up dispatch.
*
* @author Attila Szegedi
*/
public class CompositeTypeBasedGuardingDynamicLinker implements TypeBasedGuardingDynamicLinker, Serializable {
private static final long serialVersionUID = 1L;

View File

@ -91,7 +91,6 @@ import jdk.internal.dynalink.CallSiteDescriptor;
* A default, fairly light implementation of a call site descriptor used for describing non-standard operations. It does
* not store {@link Lookup} objects but always returns the public lookup from its {@link #getLookup()} method. If you
* need to support non-public lookup, you can use {@link LookupCallSiteDescriptor}.
* @author Attila Szegedi
*/
class DefaultCallSiteDescriptor extends AbstractCallSiteDescriptor {

View File

@ -94,7 +94,6 @@ import jdk.internal.dynalink.linker.LinkerServices;
/**
* Utility methods for creating typical guards. TODO: introduce reasonable caching of created guards.
*
* @author Attila Szegedi
*/
public class Guards {
private static final Logger LOG = Logger

View File

@ -89,8 +89,6 @@ import jdk.internal.dynalink.linker.LinkRequest;
/**
* Default implementation of the {@link LinkRequest}, representing a link request to a call site that passes no language
* runtime specific native context arguments on the stack.
*
* @author Attila Szegedi
*/
public class LinkRequestImpl implements LinkRequest {

View File

@ -94,8 +94,6 @@ import jdk.internal.dynalink.linker.MethodHandleTransformer;
/**
* Default implementation of the {@link LinkerServices} interface.
*
* @author Attila Szegedi
*/
public class LinkerServicesImpl implements LinkerServices {

View File

@ -93,8 +93,6 @@ import java.lang.reflect.Method;
/**
* A wrapper around MethodHandles.Lookup that masks checked exceptions in those cases when you're looking up methods
* within your own codebase (therefore it is an error if they are not present).
*
* @author Attila Szegedi
*/
public class Lookup {
private final MethodHandles.Lookup lookup;

View File

@ -89,7 +89,6 @@ import jdk.internal.dynalink.CallSiteDescriptor;
/**
* A call site descriptor that stores a specific {@link Lookup}. It does not, however, store static bootstrap arguments.
* @author Attila Szegedi
*/
class LookupCallSiteDescriptor extends DefaultCallSiteDescriptor {
private final Lookup lookup;

View File

@ -99,8 +99,6 @@ import jdk.internal.dynalink.CallSiteDescriptor;
* have your own way of creating call site descriptors, but you still delegate to this method of the default factory
* (it is recommended that you do), then you have demangling handled for you already, and only need to ensure that you
* mangle the names when you're emitting them in the bytecode.
*
* @author Attila Szegedi
*/
public class NameCodec {
private static final char ESCAPE_CHAR = '\\';

View File

@ -89,8 +89,6 @@ import jdk.internal.dynalink.linker.LinkRequest;
/**
* A link request implementation for call sites that pass language runtime specific context arguments on the stack. The
* context specific arguments should be the first "n" arguments.
*
* @author Attila Szegedi
*/
public class RuntimeContextLinkRequestImpl extends LinkRequestImpl {

View File

@ -103,8 +103,6 @@ import jdk.internal.dynalink.linker.MethodTypeConversionStrategy;
* A factory for type converters. This class is the main implementation behind the
* {@link LinkerServices#asType(MethodHandle, MethodType)}. It manages the known {@link GuardingTypeConverterFactory}
* instances and creates appropriate converters for method handles.
*
* @author Attila Szegedi
*/
public class TypeConverterFactory {

View File

@ -96,8 +96,6 @@ import java.util.Set;
/**
* Various static utility methods for testing type relationships.
*
* @author Attila Szegedi
*/
public class TypeUtilities {
static final Class<Object> OBJECT_CLASS = Object.class;