Uses of Class
java.lang.reflect.Method
Package
Description
Contains classes related to developing beans -- components based on
the JavaBeans architecture.
Provides classes that are fundamental to the design of the Java
programming language.
Provides library support for the Java programming language
annotation facility.
The
java.lang.invoke
package provides low-level primitives for interacting
with the Java Virtual Machine.Provides classes and interfaces for obtaining reflective information about
classes and objects.
Provides classes and interfaces for supporting the server side of RMI.
Provides the core classes for the Java Management Extensions.
Provides the definition of the ModelMBean classes.
Provides the open data types and Open MBean descriptor classes.
Contains classes that make it more convenient for language runtimes to
implement their own language-specific object models and type conversions
by providing basic implementations of some classes as well as various
utilities.
Provides implementation support for building JShell execution engines.
-
Uses of Method in java.beans
Modifier and TypeMethodDescriptionEventSetDescriptor.getAddListenerMethod()
Gets the method used to add event listeners.EventSetDescriptor.getGetListenerMethod()
Gets the method used to access the registered event listeners.IndexedPropertyDescriptor.getIndexedReadMethod()
Gets the method that should be used to read an indexed property value.IndexedPropertyDescriptor.getIndexedWriteMethod()
Gets the method that should be used to write an indexed property value.Method[]
EventSetDescriptor.getListenerMethods()
Gets the methods of the target listener interface.MethodDescriptor.getMethod()
Gets the method that this MethodDescriptor encapsulates.PropertyDescriptor.getReadMethod()
Gets the method that should be used to read the property value.EventSetDescriptor.getRemoveListenerMethod()
Gets the method used to remove event listeners.PropertyDescriptor.getWriteMethod()
Gets the method that should be used to write the property value.Modifier and TypeMethodDescriptionExtract the appropriate property value from the event and pass it to the action associated with thisEventHandler
.void
IndexedPropertyDescriptor.setIndexedReadMethod(Method readMethod)
Sets the method that should be used to read an indexed property value.void
IndexedPropertyDescriptor.setIndexedWriteMethod(Method writeMethod)
Sets the method that should be used to write an indexed property value.void
PropertyDescriptor.setReadMethod(Method readMethod)
Sets the method that should be used to read the property value.void
PropertyDescriptor.setWriteMethod(Method writeMethod)
Sets the method that should be used to write the property value.ModifierConstructorDescriptionEventSetDescriptor(String eventSetName, Class<?> listenerType, MethodDescriptor[] listenerMethodDescriptors, Method addListenerMethod, Method removeListenerMethod)
Creates anEventSetDescriptor
from scratch usingjava.lang.reflect.MethodDescriptor
andjava.lang.Class
objects.EventSetDescriptor(String eventSetName, Class<?> listenerType, Method[] listenerMethods, Method addListenerMethod, Method removeListenerMethod)
Creates anEventSetDescriptor
from scratch usingjava.lang.reflect.Method
andjava.lang.Class
objects.EventSetDescriptor(String eventSetName, Class<?> listenerType, Method[] listenerMethods, Method addListenerMethod, Method removeListenerMethod, Method getListenerMethod)
This constructor creates an EventSetDescriptor from scratch using java.lang.reflect.Method and java.lang.Class objects.IndexedPropertyDescriptor(String propertyName, Method readMethod, Method writeMethod, Method indexedReadMethod, Method indexedWriteMethod)
This constructor takes the name of a simple property, and Method objects for reading and writing the property.MethodDescriptor(Method method)
Constructs aMethodDescriptor
from aMethod
.MethodDescriptor(Method method, ParameterDescriptor[] parameterDescriptors)
Constructs aMethodDescriptor
from aMethod
providing descriptive information for each of the method's parameters.PropertyDescriptor(String propertyName, Method readMethod, Method writeMethod)
This constructor takes the name of a simple property, and Method objects for reading and writing the property. -
Uses of Method in java.lang
Modifier and TypeMethodDescriptionClass.getDeclaredMethod(String name, Class<?>... parameterTypes)
Returns aMethod
object that reflects the specified declared method of the class or interface represented by thisClass
object.Method[]
Class.getDeclaredMethods()
Returns an array containingMethod
objects reflecting all the declared methods of the class or interface represented by thisClass
object, including public, protected, default (package) access, and private methods, but excluding inherited methods.Class.getEnclosingMethod()
If thisClass
object represents a local or anonymous class within a method, returns aMethod
object representing the immediately enclosing method of the underlying class.Returns aMethod
object that reflects the specified public member method of the class or interface represented by thisClass
object.Method[]
Class.getMethods()
Returns an array containingMethod
objects reflecting all the public methods of the class or interface represented by thisClass
object, including those declared by the class or interface and those inherited from superclasses and superinterfaces. -
Uses of Method in java.lang.annotation
Modifier and TypeMethodDescriptionAnnotationTypeMismatchException.element()
Returns theMethod
object for the incorrectly typed element.ModifierConstructorDescriptionAnnotationTypeMismatchException(Method element, String foundType)
Constructs an AnnotationTypeMismatchException for the specified annotation type element and found data type. -
Uses of Method in java.lang.invoke
Modifier and TypeMethodDescriptionMakes a direct method handle to m, if the lookup class has permission.MethodHandles.Lookup.unreflectSpecial(Method m, Class<?> specialCaller)
Produces a method handle for a reflected method. -
Uses of Method in java.lang.reflect
Modifier and TypeMethodDescriptionRecordComponent.getAccessor()
Returns aMethod
that represents the accessor for this record component.Modifier and TypeMethodDescriptionMethod.getTypeParameters()
Returns an array ofTypeVariable
objects that represent the type variables declared by the generic declaration represented by thisGenericDeclaration
object, in declaration order.Modifier and TypeMethodDescriptionProcesses a method invocation on a proxy instance and returns the result.static Object
InvocationHandler.invokeDefault(Object proxy, Method method, Object... args)
Invokes the specified default method on the givenproxy
instance with the given parameters. -
Uses of Method in java.rmi.server
Modifier and TypeMethodDescriptionProcesses a method invocation made on the encapsulating proxy instance,proxy
, and returns the result.Invoke a method. -
Uses of Method in javax.management
Modifier and TypeMethodDescriptionModifierConstructorDescriptionMBeanAttributeInfo(String name, String description, Method getter, Method setter)
This constructor takes the name of a simple attribute, and Method objects for reading and writing the attribute.MBeanOperationInfo(String description, Method method)
Constructs anMBeanOperationInfo
object. -
Uses of Method in javax.management.modelmbean
ModifierConstructorDescriptionModelMBeanAttributeInfo(String name, String description, Method getter, Method setter)
Constructs a ModelMBeanAttributeInfo object with a default descriptor.ModelMBeanAttributeInfo(String name, String description, Method getter, Method setter, Descriptor descriptor)
Constructs a ModelMBeanAttributeInfo object.ModelMBeanOperationInfo(String description, Method operationMethod)
Constructs a ModelMBeanOperationInfo object with a default descriptor.ModelMBeanOperationInfo(String description, Method operationMethod, Descriptor descriptor)
Constructs a ModelMBeanOperationInfo object. -
Uses of Method in javax.management.openmbean
-
Uses of Method in jdk.dynalink.linker.support
Modifier and TypeMethodDescriptionstatic MethodHandle
Lookup.unreflect(MethodHandles.Lookup lookup, Method m)
Performs aMethodHandles.Lookup.unreflect(Method)
, converting any encounteredIllegalAccessException
into anIllegalAccessError
.Performs aMethodHandles.Lookup.unreflect(Method)
, converting any encounteredIllegalAccessException
into anIllegalAccessError
. -
Uses of Method in jdk.jshell.execution