| java.lang.Object org.eclipse.jdt.internal.corext.codemanipulation.GetterSetterUtil
GetterSetterUtil | public class GetterSetterUtil (Code) | | |
Method Summary | |
public static Expression | getAssignedValue(ASTNode node, ASTRewrite astRewrite, Expression getterExpression, ITypeBinding variableType, boolean is50OrHigher) Converts an assignment, postfix expression or prefix expression into an assignable equivalent expression using the getter. | public static IMethod | getGetter(IField field) | public static String | getGetterName(IField field, String[] excludedNames) | public static String | getGetterName(IVariableBinding variableType, IJavaProject project, String[] excludedNames, boolean isBoolean) | public static String | getGetterName(IJavaProject project, String fieldName, int flags, boolean isBoolean, String[] excludedNames) | public static String | getGetterStub(IField field, String getterName, boolean addComments, int flags) Create a stub for a getter of the given field using getter/setter templates. | public static IMethod | getSetter(IField field) | public static String | getSetterName(IVariableBinding variableType, IJavaProject project, String[] excludedNames, boolean isBoolean) | public static String | getSetterName(IJavaProject project, String fieldName, int flags, boolean isBoolean, String[] excludedNames) | public static String | getSetterName(IField field, String[] excludedNames) | public static String | getSetterStub(IField field, String setterName, boolean addComments, int flags) Create a stub for a getter of the given field using getter/setter templates. |
getAssignedValue | public static Expression getAssignedValue(ASTNode node, ASTRewrite astRewrite, Expression getterExpression, ITypeBinding variableType, boolean is50OrHigher)(Code) | | Converts an assignment, postfix expression or prefix expression into an assignable equivalent expression using the getter.
Parameters: node - the assignment/prefix/postfix node Parameters: astRewrite - the astRewrite to use Parameters: getterExpression - the expression to insert for read accesses or null if such an expression does not exist Parameters: variableType - the type of the variable that the result will be assigned to Parameters: is50OrHigher - true if a 5.0 or higher environment can be used an expression that can be assigned to the type variableType with node being replaced by a equivalent expression using the getter |
getGetterStub | public static String getGetterStub(IField field, String getterName, boolean addComments, int flags) throws CoreException(Code) | | Create a stub for a getter of the given field using getter/setter templates. The resulting code
has to be formatted and indented.
Parameters: field - The field to create a getter for Parameters: getterName - The chosen name for the getter Parameters: addComments - If true , comments will be added. Parameters: flags - The flags signaling visibility, if static, synchronized or final Returns the generated stub. throws: CoreException - |
getSetterStub | public static String getSetterStub(IField field, String setterName, boolean addComments, int flags) throws CoreException(Code) | | Create a stub for a getter of the given field using getter/setter templates. The resulting code
has to be formatted and indented.
Parameters: field - The field to create a getter for Parameters: setterName - The chosen name for the setter Parameters: addComments - If true , comments will be added. Parameters: flags - The flags signaling visibility, if static, synchronized or final Returns the generated stub. throws: CoreException - |
|
|