return null; } else if (node instanceof BooleanLiteral) { return new DefaultTypeDescriptor(TYPE_BOOLEAN); } else if (node instanceof StringLiteral) { return new DefaultTypeDescriptor(TYPE_STRING); } else if (node instanceof CharLiteral) { return new DefaultTypeDescriptor(TYPE_CHAR); } else if (node instanceof IntegralLiteral) { IntegralLiteral literal = (IntegralLiteral) node; return new DefaultTypeDescriptor(TYPE_LONG); } else { return new DefaultTypeDescriptor(TYPE_INT); return new DefaultTypeDescriptor(TYPE_FLOAT); } else { return new DefaultTypeDescriptor(TYPE_DOUBLE); case LESS: case LESS_OR_EQUAL: return new DefaultTypeDescriptor(TYPE_BOOLEAN);
public TypeDescriptor getType() { return new DefaultTypeDescriptor(getName()); }
private static TypeDescriptor getTypeDescriptor(String fqn) { return new DefaultTypeDescriptor(fqn); }
@Override public String toString() { return getSignature(); }
@Override public boolean matchesSignature(@NonNull String signature) { return matchesName(signature); }
@NonNull @Override public TypeDescriptor getType() { return new DefaultTypeDescriptor(mSignature); }
@NonNull @Override public String getSignature() { return getName(); }
/** * Returns the set of exception types handled by the given catch block. * <p> * This is a workaround for the fact that the Lombok AST API (and implementation) * doesn't support multi-catch statements. * @deprecated Use {@link JavaPsiScanner} APIs instead */ @Deprecated public List<TypeDescriptor> getCatchTypes(@NonNull JavaContext context, @NonNull Catch catchBlock) { TypeReference typeReference = catchBlock.astExceptionDeclaration().astTypeReference(); return Collections.singletonList(new DefaultTypeDescriptor( typeReference.getTypeName())); }
@NonNull @Override public TypeDescriptor getType() { return new DefaultTypeDescriptor(mSignature); }