public boolean canAcceptParent ( Class < ? extends ElementBase > clazz ) { if ( ! canAcceptParent ( getClass ( ) , clazz ) ) { rejectReason = getDisplayName ( ) + " does not accept " + clazz . getSimpleName ( ) + " as a parent." ; } else { rejectReason = null ; } return rejectReason == null ; }
Returns true if this element may accept a parent of the specified class . Updates the reject reason with the result .