public String getPreviousClassType() { ExpressionPart last = getPreviousPart(); return last.getPrevious() == null ? null : last.getPrevious().getClassType(); }
@Override public String toString() { return getName(); }
public void removeLast() { if ( !parts.isEmpty() ) { ExpressionPart last = parts.removeLast(); if ( last.getPrevious() != null ) { last.getPrevious().setNext( null ); last.setPrevious( null ); } } }
public String getPreviousGenericType() { ExpressionPart prev = getPreviousPart().getPrevious(); return prev == null ? null : prev.getGenericType(); }
public ExpressionFormLine(ExpressionFormLine other) { CopyExpressionVisitor copier = new CopyExpressionVisitor(); if ( other.getParts().size() == 0 ) { return; } for ( ExpressionPart exp = copier.copy( other.getRootExpression() ); exp != null; exp = exp.getNext() ) { parts.add( exp ); } }
public ExpressionPart copy(ExpressionPart part) { root = null; curr = null; part.accept(this); return root; }
private void add(ExpressionPart p) { if (root == null) { root = p; curr = p; } else { curr.setNext(p); curr = p; } }
public String getClassType() { return parts.getLast().getClassType(); }
public String getParametricType() { return parts.getLast().getParametricType(); }
public String getGenericType() { return parts.isEmpty() ? null : parts.getLast().getGenericType(); }
public void removeLast() { if ( !parts.isEmpty() ) { ExpressionPart last = parts.removeLast(); if ( last.getPrevious() != null ) { last.getPrevious().setNext( null ); last.setPrevious( null ); } } }
public String getPreviousGenericType() { ExpressionPart prev = getPreviousPart().getPrevious(); return prev == null ? null : prev.getGenericType(); }
public ExpressionFormLine(ExpressionFormLine other) { CopyExpressionVisitor copier = new CopyExpressionVisitor(); if ( other.getParts().size() == 0 ) { return; } for ( ExpressionPart exp = copier.copy( other.getRootExpression() ); exp != null; exp = exp.getNext() ) { parts.add( exp ); } }
public ExpressionPart copy(ExpressionPart part) { root = null; curr = null; part.accept(this); return root; }
private void add(ExpressionPart p) { if (root == null) { root = p; curr = p; } else { curr.setNext(p); curr = p; } }
public String getClassType() { return parts.getLast().getClassType(); }
public String getParametricType() { return parts.getLast().getParametricType(); }
public String getGenericType() { return parts.isEmpty() ? null : parts.getLast().getGenericType(); }