public class FuzzyMethodCvt extends FuzzyMethodLookup
| Modifier and Type | Field and Description |
|---|---|
private ClassDefinition |
clsDef
The class definition where the search will start.
|
private static ConversionStatus |
LOG
Logger.
|
| Constructor and Description |
|---|
FuzzyMethodCvt(ClassDefinition clsDef)
Initialize this instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.List<MatchMetrics> |
candidates(java.lang.String name,
int num,
int access,
boolean isStatic,
boolean internal,
boolean first,
java.util.Set<SignatureKey> exist)
Get the list of all possible methods that could match in this class AND its parent classes.
|
protected java.lang.String |
getClassName()
Get the class name where this method lookup starts from.
|
protected boolean |
isImplemented(java.lang.String caller,
java.lang.String callee)
Detect if the callee class is an instance of an implemented interface of the caller class.
|
protected boolean |
isInheritedFrom(java.lang.String caller,
java.lang.String callee,
java.lang.Runnable incrementer)
Detect if the callee class is an instance of a parent class or an implemented interface of a parent
class, of the caller.
|
protected boolean |
isSetParam(java.lang.String method)
Reports if the class name is Progress.Lang.ParameterList and the method name is
setParameter(). |
private ClassDefinition |
parseObjectSpec(java.lang.String spec)
Parse the given object spec (in the form "object extends _CLS_>" or "jobject extends _CLS_>") and
return the class definition associated with _CLS_.
|
fuzzyMethodLookupprivate static final ConversionStatus LOG
private final ClassDefinition clsDef
public FuzzyMethodCvt(ClassDefinition clsDef)
clsDef - The type where the method lookup starts from.protected java.util.List<MatchMetrics> candidates(java.lang.String name, int num, int access, boolean isStatic, boolean internal, boolean first, java.util.Set<SignatureKey> exist)
candidates in class FuzzyMethodLookupname - Method name.num - Number of parameters.access - Access mode (KW_PUBLIC, KW_PROTECTD or KW_PRIVATE).isStatic - If true, only static methods will be looked up. Otherwise any method can be
returned.internal - true if the lookup is internal to the current class definition.first - true if the first match should be immediately returned as the result.exist - The set of existing methods already represented in the list.protected boolean isImplemented(java.lang.String caller,
java.lang.String callee)
isImplemented in class FuzzyMethodLookupcaller - The caller type.callee - The callee type.true if the given class is an implemented interface in this class.protected boolean isInheritedFrom(java.lang.String caller,
java.lang.String callee,
java.lang.Runnable incrementer)
isInheritedFrom in class FuzzyMethodLookupcaller - The caller type.callee - The callee type to check.incrementer - Code to be executed to increment the inheritance level.true if the given class is a parent class or an implemented interface of a parent
class.protected boolean isSetParam(java.lang.String method)
setParameter().isSetParam in class FuzzyMethodLookupmethod - The method name.true if this is a setParameter call.protected java.lang.String getClassName()
getClassName in class FuzzyMethodLookupprivate ClassDefinition parseObjectSpec(java.lang.String spec)
spec - The specification to parse.null if the spec was malformed or if there is no such
definition.