|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.drools.eclipse.editors.completion.CompletionUtil
public class CompletionUtil
| Field Summary | |
|---|---|
protected static Pattern |
COMPLETED_MVEL_EXPRESSION
|
protected static Pattern |
INCOMPLETED_MVEL_EXPRESSION
|
protected static Pattern |
MODIFY_PATTERN
|
protected static Pattern |
START_OF_METHOD_ARGS
|
protected static Pattern |
START_OF_NEW_JAVA_STATEMENT
|
| Method Summary | |
|---|---|
static String |
getCompilableText(String backText)
Attempt to enhance a consequence backtext such that it should compile in MVEL |
static String |
getInnerExpression(String backText)
|
static String |
getLastExpression(String backText)
|
static String |
getLastLine(String text)
|
static String |
getPreviousExpression(String backText)
|
static String |
getPropertyName(String methodName,
char[] signature)
|
static String |
getPropertyName(String methodName,
int parameterCount,
String returnType)
Given a data depicting a method (name, # or params/args, returned type key), tries to return a bean property name derived from that method. |
static String |
getSimpleClassName(Class cls)
COMPENSATES FOR LACK OF getSimpleName IN java.lang.Class Borrowed and adpated from MVEL's org.mvel.util.ParseTools.getSimpleClassName(Class) |
static String |
getTextWithoutPrefix(String javaText,
String prefix)
|
static String |
getWritablePropertyName(String methodName,
char[] signature)
|
static String |
getWritablePropertyName(String methodName,
int parameterCount,
String returnType)
Given a data depicting a method (name, # or params/args, returned type key), tries to return a writable bean property name derived from that method. |
static boolean |
isGetter(String methodName,
int argCount,
String returnedType)
|
static boolean |
isIsGetter(String methodName,
int argCount,
String returnedType)
|
static boolean |
isSetter(String methodName,
int argCount,
String returnedType)
|
static boolean |
isStartOfDialectExpression(String text)
|
static boolean |
isStartOfMethodArgsExpression(String text)
|
static boolean |
isStartOfNewStatement(String text,
String prefix)
|
static int |
nestedExpressionIndex(char[] chars,
int start,
char type)
|
static String |
stripLastWord(String prefix)
Looks behind, gets stuff after the white space. |
static String |
stripWhiteSpace(String prefix)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Pattern INCOMPLETED_MVEL_EXPRESSION
protected static final Pattern COMPLETED_MVEL_EXPRESSION
protected static final Pattern MODIFY_PATTERN
protected static final Pattern START_OF_NEW_JAVA_STATEMENT
protected static final Pattern START_OF_METHOD_ARGS
| Method Detail |
|---|
public static String stripLastWord(String prefix)
public static String getPreviousExpression(String backText)
public static String getLastExpression(String backText)
public static String getInnerExpression(String backText)
public static int nestedExpressionIndex(char[] chars,
int start,
char type)
public static String stripWhiteSpace(String prefix)
public static String getCompilableText(String backText)
backText -
public static boolean isGetter(String methodName,
int argCount,
String returnedType)
public static boolean isSetter(String methodName,
int argCount,
String returnedType)
public static boolean isIsGetter(String methodName,
int argCount,
String returnedType)
public static String getPropertyName(String methodName,
int parameterCount,
String returnType)
methodName - parameterCount - returnType -
public static String getPropertyName(String methodName,
char[] signature)
public static String getWritablePropertyName(String methodName,
int parameterCount,
String returnType)
methodName - parameterCount - returnType -
public static String getWritablePropertyName(String methodName,
char[] signature)
public static boolean isStartOfNewStatement(String text,
String prefix)
public static String getLastLine(String text)
public static String getSimpleClassName(Class cls)
cls - -- class reference
public static String getTextWithoutPrefix(String javaText,
String prefix)
public static boolean isStartOfDialectExpression(String text)
public static boolean isStartOfMethodArgsExpression(String text)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||