Top Description Inners Fields Constructors Methods
org.jboss.jandex

pack-priv final Class MethodInternal

extends Object
Class Inheritance
Imports
java.util.Arrays, .Comparator, .List

The shared internal representation for MethodInfo objects.
Author
Jason T. Greene

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private AnnotationInstance[]
private AnnotationValue
private final Type[]
pack-priv static final MethodInternal[]
pack-priv static final byte[][]
private Type[]
private short
private byte[]
pack-priv static final MethodInternal.NameAndParameterComponentComparator
private byte[][]
private Type[]
private Type
private Type
private Type[]

Constructor Summary

AccessConstructor and Description
pack-priv
MethodInternal(byte[] name, byte[][] parameterNames, Type[] parameterTypes, Type returnType, short flags)

pack-priv
MethodInternal(byte[] name, byte[][] parameterNames, Type[] parameterTypes, Type returnType, short flags, Type[] typeParameters, Type[] exceptions)

pack-priv
MethodInternal(byte[] name, byte[][] parameterNames, Type[] parameterTypes, Type returnType, short flags, Type receiverType, Type[] typeParameters, Type[] exceptions, AnnotationInstance[] annotations, AnnotationValue defaultValue)

Method Summary

Modifier and TypeMethod and Description
pack-priv final AnnotationInstance
pack-priv final AnnotationInstance[]
pack-priv final List<AnnotationInstance>
pack-priv final Type[]
pack-priv final Type[]
pack-priv final AnnotationValue
pack-priv final List<Type>
pack-priv final Type[]
public boolean
equals(Object
the reference object with which to compare.
o
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
pack-priv final Type[]
pack-priv final List<Type>
pack-priv final short
pack-priv final boolean
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
pack-priv boolean
pack-priv int
pack-priv final String
name()

pack-priv final byte[]
pack-priv final String
pack-priv final byte[][]
pack-priv final int
pack-priv final List<Type>
pack-priv final Type[]
pack-priv final Type
pack-priv final Type
pack-priv final Type
pack-priv void
pack-priv void
pack-priv void
setExceptions(Type[] exceptions)

pack-priv void
setParameterNames(byte[][] parameterNames)

pack-priv void
setParameterTypes(Type[] parameterTypes)

pack-priv void
setReceiverType(Type receiverType)

pack-priv void
setReturnType(Type returnType)

pack-priv void
setTypeParameters(Type[] typeParameters)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
pack-priv final Type[]
pack-priv final List<TypeVariable>
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

annotationsback to summary
private AnnotationInstance[] annotations
defaultValueback to summary
private AnnotationValue defaultValue
descriptorParameterTypesback to summary
private final Type[] descriptorParameterTypes
EMPTY_ARRAYback to summary
pack-priv static final MethodInternal[] EMPTY_ARRAY
EMPTY_PARAMETER_NAMESback to summary
pack-priv static final byte[][] EMPTY_PARAMETER_NAMES
exceptionsback to summary
private Type[] exceptions
flagsback to summary
private short flags
nameback to summary
private byte[] name
NAME_AND_PARAMETER_COMPONENT_COMPARATORback to summary
pack-priv static final MethodInternal.NameAndParameterComponentComparator NAME_AND_PARAMETER_COMPONENT_COMPARATOR
parameterNamesback to summary
private byte[][] parameterNames
parameterTypesback to summary
private Type[] parameterTypes
receiverTypeback to summary
private Type receiverType
returnTypeback to summary
private Type returnType
typeParametersback to summary
private Type[] typeParameters

Constructor Detail

MethodInternalback to summary
pack-priv MethodInternal(byte[] name, byte[][] parameterNames, Type[] parameterTypes, Type returnType, short flags)
MethodInternalback to summary
pack-priv MethodInternal(byte[] name, byte[][] parameterNames, Type[] parameterTypes, Type returnType, short flags, Type[] typeParameters, Type[] exceptions)
MethodInternalback to summary
pack-priv MethodInternal(byte[] name, byte[][] parameterNames, Type[] parameterTypes, Type returnType, short flags, Type receiverType, Type[] typeParameters, Type[] exceptions, AnnotationInstance[] annotations, AnnotationValue defaultValue)

Method Detail

annotationback to summary
pack-priv final AnnotationInstance annotation(DotName name)
annotationArrayback to summary
pack-priv final AnnotationInstance[] annotationArray()
annotationsback to summary
pack-priv final List<AnnotationInstance> annotations()
copyExceptionsback to summary
pack-priv final Type[] copyExceptions()
copyParameterTypesback to summary
pack-priv final Type[] copyParameterTypes()
defaultValueback to summary
pack-priv final AnnotationValue defaultValue()
descriptorParameterTypesback to summary
pack-priv final List<Type> descriptorParameterTypes()
descriptorParameterTypesArrayback to summary
pack-priv final Type[] descriptorParameterTypesArray()
equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.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.

Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
exceptionArrayback to summary
pack-priv final Type[] exceptionArray()
exceptionsback to summary
pack-priv final List<Type> exceptions()
flagsback to summary
pack-priv final short flags()
hasAnnotationback to summary
pack-priv final boolean hasAnnotation(DotName name)
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the 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.
Returns:int

a hash code value for this object.

Annotations
@Override
internEqualsback to summary
pack-priv boolean internEquals(Object o)
internHashCodeback to summary
pack-priv int internHashCode()
nameback to summary
pack-priv final String name()
nameBytesback to summary
pack-priv final byte[] nameBytes()
parameterNameback to summary
pack-priv final String parameterName(int i)
parameterNamesBytesback to summary
pack-priv final byte[][] parameterNamesBytes()
parametersCountback to summary
pack-priv final int parametersCount()
parameterTypesback to summary
pack-priv final List<Type> parameterTypes()
parameterTypesArrayback to summary
pack-priv final Type[] parameterTypesArray()
receiverTypeback to summary
pack-priv final Type receiverType(ClassInfo clazz)
receiverTypeFieldback to summary
pack-priv final Type receiverTypeField()
returnTypeback to summary
pack-priv final Type returnType()
setAnnotationsback to summary
pack-priv void setAnnotations(List<AnnotationInstance> annotations)
setDefaultValueback to summary
pack-priv void setDefaultValue(AnnotationValue defaultValue)
setExceptionsback to summary
pack-priv void setExceptions(Type[] exceptions)
setParameterNamesback to summary
pack-priv void setParameterNames(byte[][] parameterNames)
setParameterTypesback to summary
pack-priv void setParameterTypes(Type[] parameterTypes)
setReceiverTypeback to summary
pack-priv void setReceiverType(Type receiverType)
setReturnTypeback to summary
pack-priv void setReturnType(Type returnType)
setTypeParametersback to summary
pack-priv void setTypeParameters(Type[] typeParameters)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
typeParameterArrayback to summary
pack-priv final Type[] typeParameterArray()
typeParametersback to summary
pack-priv final List<TypeVariable> typeParameters()
org.jboss.jandex back to summary

pack-priv Class MethodInternal.NameAndParameterComponentComparator

extends Object
implements Comparator<MethodInternal>
Class Inheritance
  • java.lang.Object
  • org.jboss.jandex.MethodInternal.NameAndParameterComponentComparator
All Implemented Interfaces
java.util.Comparator

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private int
compare(byte[]
the first object to be compared.
left
,
byte[]
the second object to be compared.
right
)

Implements java.util.Comparator.compare.

Compares its two arguments for order.
public int
compare(MethodInternal
the first object to be compared.
instance
,
MethodInternal
the second object to be compared.
instance2
)

Implements java.util.Comparator.compare.

Compares its two arguments for order.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NameAndParameterComponentComparatorback to summary
pack-priv NameAndParameterComponentComparator()

Method Detail

compareback to summary
private int compare(byte[] left, byte[] right)

Implements java.util.Comparator.compare.

Doc from java.util.Comparator.compare.

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

The implementor must ensure that signum(compare(x, y)) == -signum(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)

The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.

Finally, the implementor must ensure that compare(x, y)==0 implies that signum(compare(x, z))==signum(compare(y, z)) for all z.

Parameters
left:byte[]

the first object to be compared.

right:byte[]

the second object to be compared.

Returns:int

a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

compareback to summary
public int compare(MethodInternal instance, MethodInternal instance2)

Implements java.util.Comparator.compare.

Doc from java.util.Comparator.compare.

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

The implementor must ensure that signum(compare(x, y)) == -signum(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)

The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.

Finally, the implementor must ensure that compare(x, y)==0 implies that signum(compare(x, z))==signum(compare(y, z)) for all z.

Parameters
instance:MethodInternal

the first object to be compared.

instance2:MethodInternal

the second object to be compared.

Returns:int

a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.