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 getClassType() { return parts.getLast().getClassType(); }
public String getPreviousGenericType() { ExpressionPart prev = getPreviousPart().getPrevious(); return prev == null ? null : prev.getGenericType(); }
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 getParametricType() { return parts.getLast().getParametricType(); }
public String getGenericType() { return parts.isEmpty() ? null : parts.getLast().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 ); } }
this.isFactTypeKnown = true; } else { this.isFactTypeKnown = getModeller().getSuggestionCompletions().isFactTypeRecognized( getModeller().getSuggestionCompletions().getFactNameFromType( this.expression.getRootExpression().getClassType() ) );
public String buildString( String bindVariable, ExpressionPart exp ) { if ( exp == null ) { return ""; } str = new StringBuilder(); first = true; exp.accept( this ); return ( bindVariable == null ? "" : bindVariable + ": " ) + str.toString(); }
public void appendPart( ExpressionPart part ) { if ( !parts.isEmpty() ) { parts.getLast().setNext( part ); } parts.add( part ); }
public String getCurrentName() { return parts.getLast().getName(); }
public String getFieldName() { return parts.isEmpty() ? null : parts.getLast().getName(); }
public String getPreviousName() { ExpressionPart previousPart = getPreviousPart(); return previousPart == null ? null : previousPart.getName(); }