/** * Checks if the field is boolean. */ public static boolean isBoolean(IField field) throws JavaModelException{ return field.getTypeSignature().equals(Signature.SIG_BOOLEAN); }
/** * Checks if the field is boolean. */ public static boolean isBoolean(IField field) throws JavaModelException{ return field.getTypeSignature().equals(Signature.SIG_BOOLEAN); }
/** * Checks if the field is boolean. * @param field the field * @return returns <code>true</code> if the field returns a boolean * @throws JavaModelException thrown when the field can not be accessed */ public static boolean isBoolean(IField field) throws JavaModelException{ return field.getTypeSignature().equals(Signature.SIG_BOOLEAN); }
/** * Checks if the field is boolean. * @param field the field * @return returns <code>true</code> if the field returns a boolean * @throws JavaModelException thrown when the field can not be accessed */ public static boolean isBoolean(IField field) throws JavaModelException{ return field.getTypeSignature().equals(Signature.SIG_BOOLEAN); }
private static boolean isPrimitiveOrString(IField field) { String fieldType; try { fieldType= field.getTypeSignature(); } catch (JavaModelException ex) { return false; } char first= fieldType.charAt(0); return (first != Signature.C_RESOLVED && first != Signature.C_UNRESOLVED && first != Signature.C_ARRAY) || (first == Signature.C_RESOLVED && fieldType.substring(1, fieldType.length() - 1).equals(String.class.getName())); } }
private static boolean hasPrimitiveType(IField field) throws JavaModelException { String signature= field.getTypeSignature(); char first= Signature.getElementType(signature).charAt(0); return (first != Signature.C_RESOLVED && first != Signature.C_UNRESOLVED); }
private static boolean hasPrimitiveType(IField field) throws JavaModelException { String signature= field.getTypeSignature(); char first= Signature.getElementType(signature).charAt(0); return (first != Signature.C_RESOLVED && first != Signature.C_UNRESOLVED); }
private static boolean hasPrimitiveType(IField field) throws JavaModelException { String signature= field.getTypeSignature(); char first= Signature.getElementType(signature).charAt(0); return (first != Signature.C_RESOLVED && first != Signature.C_UNRESOLVED); }
private FieldDeclaration convert(IField field, IType type) throws JavaModelException { TypeReference typeReference = createTypeReference(field.getTypeSignature()); if (typeReference == null) return null; FieldDeclaration fieldDeclaration = new FieldDeclaration(); fieldDeclaration.name = field.getElementName().toCharArray(); fieldDeclaration.type = typeReference; fieldDeclaration.modifiers = field.getFlags(); return fieldDeclaration; }
private FieldDeclaration convert(IField field, IType type) throws JavaModelException { TypeReference typeReference = createTypeReference(field.getTypeSignature()); if (typeReference == null) return null; FieldDeclaration fieldDeclaration = new FieldDeclaration(); fieldDeclaration.name = field.getElementName().toCharArray(); fieldDeclaration.type = typeReference; fieldDeclaration.modifiers = field.getFlags(); return fieldDeclaration; }
private FieldDeclaration convert(IField field, IType type) throws JavaModelException { TypeReference typeReference = createTypeReference(field.getTypeSignature()); if (typeReference == null) return null; FieldDeclaration fieldDeclaration = new FieldDeclaration(); fieldDeclaration.name = field.getElementName().toCharArray(); fieldDeclaration.type = typeReference; fieldDeclaration.modifiers = field.getFlags(); return fieldDeclaration; }
@JavaSelectionSubscriber(METHOD_BODY) public Status onFieldSelection(final IField var, final JavaSelectionEvent event, final Composite parent) throws JavaModelException { return handle(var, var.getElementName(), var.getTypeSignature(), event, parent); }
private FieldDeclaration convert(IField field, IType type) throws JavaModelException { TypeReference typeReference = createTypeReference(field.getTypeSignature()); if (typeReference == null) return null; FieldDeclaration fieldDeclaration = new FieldDeclaration(); fieldDeclaration.name = field.getElementName().toCharArray(); fieldDeclaration.type = typeReference; fieldDeclaration.modifiers = field.getFlags(); return fieldDeclaration; }
private FieldDeclaration convert(IField field, IType type) throws JavaModelException { TypeReference typeReference = createTypeReference(field.getTypeSignature()); if (typeReference == null) return null; FieldDeclaration fieldDeclaration = new FieldDeclaration(); fieldDeclaration.name = field.getElementName().toCharArray(); fieldDeclaration.type = typeReference; fieldDeclaration.modifiers = field.getFlags(); return fieldDeclaration; }
private FieldDeclaration convert(IField field, IType type) throws JavaModelException { TypeReference typeReference = createTypeReference(field.getTypeSignature()); if (typeReference == null) return null; FieldDeclaration fieldDeclaration = new FieldDeclaration(); fieldDeclaration.name = field.getElementName().toCharArray(); fieldDeclaration.type = typeReference; fieldDeclaration.modifiers = field.getFlags(); return fieldDeclaration; }
@Override protected String doGetValue(Field pi) { IField field= fDescriptor.getType().getField(pi.getFieldName()); try { return Signature.toString(field.getTypeSignature()); } catch (JavaModelException e) { return RefactoringMessages.ExtractClassWizard_not_available; } } });
@Override protected String doGetValue(Field pi) { IField field= fDescriptor.getType().getField(pi.getFieldName()); try { return Signature.toString(field.getTypeSignature()); } catch (JavaModelException e) { return RefactoringMessages.ExtractClassWizard_not_available; } } });
private String createFieldComment(IField field, String lineDelimiter) throws JavaModelException, CoreException { String typeName= Signature.toString(field.getTypeSignature()); String fieldName= field.getElementName(); return CodeGeneration.getFieldComment(field.getCompilationUnit(), typeName, fieldName, lineDelimiter); }
private String createFieldComment(IField field, String lineDelimiter) throws JavaModelException, CoreException { String typeName= Signature.toString(field.getTypeSignature()); String fieldName= field.getElementName(); return CodeGeneration.getFieldComment(field.getCompilationUnit(), typeName, fieldName, lineDelimiter); }
private String createFieldComment(IField field, String lineDelimiter) throws JavaModelException, CoreException { String typeName= Signature.toString(field.getTypeSignature()); String fieldName= field.getElementName(); return CodeGeneration.getFieldComment(field.getCompilationUnit(), typeName, fieldName, lineDelimiter); }