public static void validateAlignment(int alignment) {
    if ((alignment <= 0) || (alignment & (alignment - 1)) != 0) {
      throw new IllegalArgumentException("invalid alignment");
    }
  }
Validates an alignment.

@param alignment the alignment
@throws IllegalArgumentException thrown if {@code alignment} isn't a positive power of 2
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/file/Section.java