Top Fields Constructors Methods
org.glassfish.pfl.dynamic.codegen.impl

public abstract Class MethodInfoBase

extends MemberInfoBase
implements MethodInfo
Class Inheritance
All Implemented Interfaces
org.glassfish.pfl.dynamic.codegen.spi.MethodInfo, org.glassfish.pfl.dynamic.codegen.spi.MemberInfo
Known Direct Subclasses
org.glassfish.pfl.dynamic.codegen.impl.MethodInfoReflectiveImpl, org.glassfish.pfl.dynamic.codegen.impl.MethodGenerator
Imports
java.lang.reflect.Constructor, .Method, java.util.ArrayList, .List, org.glassfish.pfl.dynamic.codegen.spi.ClassInfo, .MethodInfo, .Signature, .Type, .Variable

Field Summary

Modifier and TypeField and Description
protected List<Variable>
protected List<Type>
private boolean
private int
protected boolean
protected Type
private Signature
private boolean

Constructor Summary

AccessConstructor and Description
protected
MethodInfoBase(ClassInfo cinfo, int modifiers)

protected
MethodInfoBase(ClassInfo cinfo, int modifiers, Type rtype, String name)

Method Summary

Modifier and TypeMethod and Description
public List<Variable>
arguments()

Implements org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.arguments.

Return a list of arguments for this method.

public synchronized void
public boolean
equals(Object obj)

Overrides org.glassfish.pfl.dynamic.codegen.impl.MemberInfoBase.equals.

Indicates whether some other object is "equal to" this one.

public List<Type>
exceptions()

Implements org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.exceptions.

Return a list of all Exception types that are declared as being throwable from this method.

public Constructor<T>
getConstructor()

Implements org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.getConstructor.

Return the Constructor that is represented by this MethodInfo, or null if no such Constructor instance exists (because this MethodInfo represents a Constructor being generated, rather than a Constructor in a Class that is loaded into the VM).

public Method
getMethod()

Implements org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.getMethod.

Return the Method that is represented by this MethodInfo, or null if no such Method instance exists (because this MethodInfo represents a Method being generated, rather than a Method in a Class that is loaded into the VM).

public synchronized int
hashCode()

Overrides org.glassfish.pfl.dynamic.codegen.impl.MemberInfoBase.hashCode.

Returns a hash code value for this object.

public boolean
isConstructor()

Implements org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.isConstructor.

Returns true if this is a constructor, false if method.

public Type
returnType()

Implements org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.returnType.

Return the Type that is returned by this method.

public synchronized Signature
signature()

Implements org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.signature.

Return the signature of this method.

Inherited from org.glassfish.pfl.dynamic.codegen.impl.MemberInfoBase:
isAccessibleInContextmodifiersmyClassInfonametoString

Field Detail

argumentsback to summary
protected List<Variable> arguments
exceptionsback to summary
protected List<Type> exceptions
hashIsCachedback to summary
private boolean hashIsCached
hashValueback to summary
private int hashValue
isConstructorback to summary
protected boolean isConstructor
rtypeback to summary
protected Type rtype
sigback to summary
private Signature sig
sigIsCachedback to summary
private boolean sigIsCached

Constructor Detail

MethodInfoBaseback to summary
protected MethodInfoBase(ClassInfo cinfo, int modifiers)
MethodInfoBaseback to summary
protected MethodInfoBase(ClassInfo cinfo, int modifiers, Type rtype, String name)

Method Detail

argumentsback to summary
public List<Variable> arguments()

Implements org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.arguments.

Doc from org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.arguments.

Return a list of arguments for this method.

clearHashCodeback to summary
public synchronized void clearHashCode()
equalsback to summary
public boolean equals(Object obj)

Overrides org.glassfish.pfl.dynamic.codegen.impl.MemberInfoBase.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

exceptionsback to summary
public List<Type> exceptions()

Implements org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.exceptions.

Doc from org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.exceptions.

Return a list of all Exception types that are declared as being throwable from this method.

getConstructorback to summary
public Constructor<T> getConstructor()

Implements org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.getConstructor.

Doc from org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.getConstructor.

Return the Constructor that is represented by this MethodInfo, or null if no such Constructor instance exists (because this MethodInfo represents a Constructor being generated, rather than a Constructor in a Class that is loaded into the VM).

getMethodback to summary
public Method getMethod()

Implements org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.getMethod.

Doc from org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.getMethod.

Return the Method that is represented by this MethodInfo, or null if no such Method instance exists (because this MethodInfo represents a Method being generated, rather than a Method in a Class that is loaded into the VM).

hashCodeback to summary
public synchronized int hashCode()

Overrides org.glassfish.pfl.dynamic.codegen.impl.MemberInfoBase.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
isConstructorback to summary
public boolean isConstructor()

Implements org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.isConstructor.

Doc from org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.isConstructor.

Returns true if this is a constructor, false if method.

returnTypeback to summary
public Type returnType()

Implements org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.returnType.

Doc from org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.returnType.

Return the Type that is returned by this method.

signatureback to summary
public synchronized Signature signature()

Implements org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.signature.

Doc from org.glassfish.pfl.dynamic.codegen.spi.MethodInfo.signature.

Return the signature of this method.