Package net.binis.codegen.compiler.utils
Class ElementMethodUtils
java.lang.Object
net.binis.codegen.compiler.utils.ElementUtils
net.binis.codegen.compiler.utils.ElementMethodUtils
-
Field Summary
Fields inherited from class net.binis.codegen.compiler.utils.ElementUtils
CLASS_MAP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CGMethodDeclarationaddConstructor(Element element, long flags, List<CGVariableDecl> params) static CGMethodDeclarationaddConstructor(CGClassDeclaration cls, long flags, List<CGVariableDecl> params) static CGMethodDeclarationaddMethod(Element element, String name, Class<?> returnType, long flags, List<CGVariableDecl> params, CGBlock body) static CGBlockstatic CGBlockcreateBlock(CGStatement... statements) static CGMethodInvocationcreateClassMethodInvocation(Class<?> cls, String methodName, CGExpression... params) static CGMethodInvocationcreateClassMethodInvocation(String cls, String methodName, CGExpression... params) static CGExpressioncreateMethodInvocation(String methodName, CGExpression... params) static CGVariableDeclcreateParameter(Class<?> cls, String name) static CGStatementcreateStatement(CGExpression expr) static CGExpressioncreateStaticMethodInvocation(Class<?> cls, String methodName, CGExpression... params) static CGExpressioncreateStaticMethodInvocation(String cls, String methodName, CGExpression... params) static booleanparamsMatch(Element e, List<String> list) Methods inherited from class net.binis.codegen.compiler.utils.ElementUtils
calcExpression, chainDots, chainDots, chainDots, chainDotsString, chainDotsString, classToExpression, createFieldAccess, getDeclaration, getDeclaration, getSymbolFullName, initClassMap, primitiveTypeTag, registerClass, selfType, toType
-
Constructor Details
-
ElementMethodUtils
public ElementMethodUtils()
-
-
Method Details
-
addMethod
public static CGMethodDeclaration addMethod(Element element, String name, Class<?> returnType, long flags, List<CGVariableDecl> params, CGBlock body) -
addConstructor
public static CGMethodDeclaration addConstructor(Element element, long flags, List<CGVariableDecl> params) -
addConstructor
public static CGMethodDeclaration addConstructor(CGClassDeclaration cls, long flags, List<CGVariableDecl> params) -
createMethodInvocation
-
createStaticMethodInvocation
public static CGExpression createStaticMethodInvocation(Class<?> cls, String methodName, CGExpression... params) -
createStaticMethodInvocation
public static CGExpression createStaticMethodInvocation(String cls, String methodName, CGExpression... params) -
createClassMethodInvocation
public static CGMethodInvocation createClassMethodInvocation(Class<?> cls, String methodName, CGExpression... params) -
createClassMethodInvocation
public static CGMethodInvocation createClassMethodInvocation(String cls, String methodName, CGExpression... params) -
createBlock
-
createBlock
-
createStatement
-
createParameter
-
paramsMatch
-