public class ShaMangler extends java.lang.Object implements NameMangler
| Constructor and Description |
|---|
ShaMangler(int maxNameLen,
int maxUnmangled,
char[] charSet)
Create an instance of the
ShaMangler. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
shortArrayName(java.lang.String symbol,
java.lang.String method,
java.lang.String suffix)
Create the short name from the
symbol, method
and suffix. |
java.lang.String |
shortName(java.lang.String symbol,
java.lang.String suffix)
Convert a type name to a short length.
|
java.lang.String |
shortName(java.lang.String symbol,
java.lang.String method,
java.lang.String suffix)
Create the short name from the
symbol, method
and suffix. |
public ShaMangler(int maxNameLen,
int maxUnmangled,
char[] charSet)
throws java.security.NoSuchAlgorithmException
ShaMangler.maxNameLen - this is the maximum number of characters that
a name may contain. For Fortran 90 and strict
ANSI C, this would be 31. For strict FORTRAN
77, this would be 6.maxUnmangled - this indicates how many characters out of
maxNameLen should be used for
unmangled content.charSet - this provides the complete set of allowable
characters that are considered distinct by
the language compiler.java.security.NoSuchAlgorithmException - this will only be thrown if the SHA message digest algorithm
is not available.public java.lang.String shortName(java.lang.String symbol,
java.lang.String method,
java.lang.String suffix)
throws java.io.UnsupportedEncodingException
symbol, method
and suffix. This mangler uses the SHA message digest to
generate the extra characters to attempt to avoid a symbol conflict.shortName in interface NameManglersymbol - the fully qualified name of the class or interface
holding the method. This name has periods separating
the different package components and class name.method - this is the full name of the method. For overloaded
methods, this should be the full method name.suffix - this suffix is used to designate what kind of
kind of function name is being generated (i.e.,
stub, skel, or impl).java.io.UnsupportedEncodingException - this exception should never occur because the ISO-8859-1 encoding
used by this method is supposed to be available on all JVMs.public java.lang.String shortArrayName(java.lang.String symbol,
java.lang.String method,
java.lang.String suffix)
throws java.io.UnsupportedEncodingException
symbol, method
and suffix. This mangler uses the SHA message digest to
generate the extra characters to attempt to avoid a symbol conflict.shortArrayName in interface NameManglersymbol - the fully qualified name of the class or interface
holding the method. This name has periods separating
the different package components and class name.method - this is the full name of the method. For overloaded
methods, this should be the full method name.suffix - this suffix is used to designate what kind of
kind of function name is being generated (i.e.,
stub, skel, or impl).java.io.UnsupportedEncodingException - this exception should never occur because the ISO-8859-1 encoding
used by this method is supposed to be available on all JVMs.public java.lang.String shortName(java.lang.String symbol,
java.lang.String suffix)
throws java.io.UnsupportedEncodingException
NameManglershortName in interface NameManglerjava.io.UnsupportedEncodingException