static void validateSymbolName(final GenericDescriptor descriptor) throws DescriptorValidationException {
  final String name=descriptor.getName();
  if (name.length() == 0) {
    throw new DescriptorValidationException(descriptor,"Missing name.");
  }
 else {
    boolean valid=true;
    for (int i=0; i < name.length(); i++) {
      final char c=name.charAt(i);
      if (c >= 128) {
        valid=false;
      }
      if (Character.isLetter(c) || c == '_' || (Character.isDigit(c) && i > 0)) {
      }
 else {
        valid=false;
      }
    }
    if (!valid) {
      throw new DescriptorValidationException(descriptor,'\"' + name + "\" is not a valid identifier.");
    }
  }
}

static void validateSymbolName ( final GenericDescriptor descriptor ) throws DescriptorValidationException { final String name = descriptor . getName ( ) ; if ( name . length ( ) == 0 ) { throw new DescriptorValidationException ( descriptor , "Missing name." ) ; } else { boolean valid = true ; for ( int i = 0 ; i < name . length ( ) ; i ++ ) { final char c = name . charAt ( i ) ; if ( c >= 128 ) { valid = false ; } if ( Character . isLetter ( c ) || c == '_' || ( Character . isDigit ( c ) && i > 0 ) ) { } else { valid = false ; } } if ( ! valid ) { throw new DescriptorValidationException ( descriptor , '\"' + name + "\" is not a valid identifier." ) ; } } }
verifies that the descriptor ' s name is valid ( i . e . it contains only letters , digits , and underscores , and does not start with a digit ) .
