Class Signature
- java.lang.Object
-
- org.fife.rsta.ac.java.classreader.attributes.AttributeInfo
-
- org.fife.rsta.ac.java.classreader.attributes.Signature
-
public class Signature extends AttributeInfo
The Signature attribute is an optional fixed-length attribute in the attribute table of the ClassFile, field_info and method_info structures.WARNING: This code is a complete mess.
- Version:
- 1.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classSignature.ParamDescriptorResult
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringsignature
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>getClassParamTypes()Returns the class-param types of this method.java.util.List<java.lang.String>getMethodParamTypes(MethodInfo mi, ClassFile cf, boolean qualified)Returns the parameter types for parameters of this method.java.lang.StringgetMethodReturnType(MethodInfo mi, ClassFile cf, boolean qualified)Returns the return type of this method.java.lang.StringgetSignature()private java.lang.StringgetTypeArgument(java.lang.String typeVar, ClassFile cf, java.util.Map<java.lang.String,java.lang.String> additionalTypeArgs)Returns the type argument specified for a given type parameter.private java.util.Map<java.lang.String,java.lang.String>parseAdditionalTypeArgs(java.lang.String typeParams)private Signature.ParamDescriptorResultparseParamDescriptor(java.lang.String str, ClassFile cf, java.util.Map<java.lang.String,java.lang.String> additionalTypeArgs, MethodInfo mi, java.lang.String errorDesc, Signature.ParamDescriptorResult res, boolean qualified)private intskipLtGt(java.lang.String str, int start)java.lang.StringtoString()-
Methods inherited from class org.fife.rsta.ac.java.classreader.attributes.AttributeInfo
getClassFile, getName, readUnsupportedAttribute
-
-
-
-
Constructor Detail
-
Signature
public Signature(ClassFile cf, java.lang.String signature)
-
-
Method Detail
-
getClassParamTypes
public java.util.List<java.lang.String> getClassParamTypes()
Returns the class-param types of this method.- Returns:
- The class-param types.
-
skipLtGt
private int skipLtGt(java.lang.String str, int start)
-
getMethodParamTypes
public java.util.List<java.lang.String> getMethodParamTypes(MethodInfo mi, ClassFile cf, boolean qualified)
Returns the parameter types for parameters of this method.- Parameters:
mi- The method information.cf- The class file being parsed.qualified- Whether the results should be fully-qualified.- Returns:
- The return types.
-
getMethodReturnType
public java.lang.String getMethodReturnType(MethodInfo mi, ClassFile cf, boolean qualified)
Returns the return type of this method.- Parameters:
mi- The method information.cf- The class file being parsed.qualified- Whether the result should be fully-qualified.- Returns:
- The return type.
-
getSignature
public java.lang.String getSignature()
-
getTypeArgument
private java.lang.String getTypeArgument(java.lang.String typeVar, ClassFile cf, java.util.Map<java.lang.String,java.lang.String> additionalTypeArgs)Returns the type argument specified for a given type parameter.- Parameters:
typeVar- The type parameter name.cf- The class file with generic methods.additionalTypeArgs- Additional type arguments for a method (such as for "<T> T[] toArray(T[] a)", where the "T" type parameter is the type of an argument passed to it).- Returns:
- The type argument, or
nullif the given type parameter isn't defined.
-
parseAdditionalTypeArgs
private java.util.Map<java.lang.String,java.lang.String> parseAdditionalTypeArgs(java.lang.String typeParams)
-
parseParamDescriptor
private Signature.ParamDescriptorResult parseParamDescriptor(java.lang.String str, ClassFile cf, java.util.Map<java.lang.String,java.lang.String> additionalTypeArgs, MethodInfo mi, java.lang.String errorDesc, Signature.ParamDescriptorResult res, boolean qualified)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-