private void command(@NotNull @MagicConstant(stringValues = {NEXT, CONTINUE, HALT, SWITCH_THREAD, STEP}) String name) { send(new DlvRequest.Command(name)).done(myStateConsumer); }
@MagicConstant(intValues = {SETUP_DISPOSED, SETUP_IN_PROGRESS, SETUP_RESULT_FAILED, SETUP_RESULT_NOT_STARTED, SETUP_RESULT_SUCCESSFUL}) public int getSetupState() { return setupState; }
/** * Set strategy to help OpenIAB chose the correct billing provider. * <p/> * * @see Builder#setStoreSearchStrategy(int) */ @MagicConstant(intValues = {SEARCH_STRATEGY_INSTALLER, SEARCH_STRATEGY_BEST_FIT, SEARCH_STRATEGY_INSTALLER_THEN_BEST_FIT}) public int getStoreSearchStrategy() { return storeSearchStrategy; }
/** * Returns if the IDE supports the requested feature. * @see Features * @since API 15 */ public abstract boolean supports( @MagicConstant(valuesFromClass = Features.class) int ideFeature);
/** * Returns current verify strategy value. * * @return The current verify mode value. * @see Builder#setVerifyMode(int) */ @MagicConstant(intValues = {VERIFY_EVERYTHING, VERIFY_ONLY_KNOWN, VERIFY_SKIP}) public int getVerifyMode() { return verifyMode; }
private Options(final Set<Appstore> availableStores, final Set<String> availableStoresNames, final Map<String, String> storeKeys, final boolean checkInventory, final @MagicConstant(intValues = {VERIFY_EVERYTHING, VERIFY_ONLY_KNOWN, VERIFY_SKIP}) int verifyMode, final Set<String> preferredStoreNames, final int samsungCertificationRequestCode, final int storeSearchStrategy) { this.checkInventory = checkInventory; this.availableStores = availableStores; this.availableStoreNames = availableStoresNames; this.storeKeys = storeKeys; this.preferredStoreNames = preferredStoreNames; this.verifyMode = verifyMode; this.samsungCertificationRequestCode = samsungCertificationRequestCode; this.storeSearchStrategy = storeSearchStrategy; }
public static TokenIElementType getTokenElementType(@MagicConstant(valuesFromClass = ANTLRv4Lexer.class)int ruleIndex){ return TOKEN_ELEMENT_TYPES.get(ruleIndex); } }
public static RuleIElementType getRuleElementType(@MagicConstant(valuesFromClass = ANTLRv4Parser.class)int ruleIndex){ return RULE_ELEMENT_TYPES.get(ruleIndex); } public static TokenIElementType getTokenElementType(@MagicConstant(valuesFromClass = ANTLRv4Lexer.class)int ruleIndex){
public abstract PsiElement shortenClassReferences(@NotNull PsiElement element, @MagicConstant(flags = {DO_NOT_ADD_IMPORTS, INCOMPLETE_CODE}) int flags) throws IncorrectOperationException;
/** * Sets up the store search strategy. * * @param storeSearchStrategy The store search strategy for OpenIAB. * Must be one of {@link #SEARCH_STRATEGY_INSTALLER}, {@link #SEARCH_STRATEGY_BEST_FIT} or {@link #SEARCH_STRATEGY_INSTALLER_THEN_BEST_FIT} * @see Options#getStoreSearchStrategy() */ @NotNull public Builder setStoreSearchStrategy( final @MagicConstant(intValues = { SEARCH_STRATEGY_INSTALLER, SEARCH_STRATEGY_BEST_FIT, SEARCH_STRATEGY_INSTALLER_THEN_BEST_FIT}) int storeSearchStrategy) { this.storeSearchStrategy = storeSearchStrategy; return this; }
/** * Creates a Java type code fragment from the text of the name of a Java type (the name * of a primitive type, array type or class).<br> * {@code void}, ellipsis and disjunctive types are optionally treated as valid ones. * * @param text the text of the Java type to create. * @param context the context for resolving references from the code fragment. * @param isPhysical whether the code fragment is created as a physical element * (see {@link PsiElement#isPhysical()}). * @param flags types allowed to present in text. * @return the created code fragment. */ @NotNull public abstract PsiTypeCodeFragment createTypeCodeFragment(@NotNull String text, @Nullable PsiElement context, boolean isPhysical, @MagicConstant(flags = {ALLOW_VOID, ALLOW_ELLIPSIS, ALLOW_DISJUNCTION}) int flags);
@Nullable @Override public <I> I getSpecificService(@NotNull final Class<I> serviceClass, @NotNull @MagicConstant(valuesFromClass = Names.class) final String serviceName) throws ClassCastException { return myRemoteSeance.getSpecificService(serviceClass, serviceName); } }
@Nullable @Override public <I> I getSpecificService(@NotNull final Class<I> serviceClass, @NotNull @MagicConstant(valuesFromClass = Names.class) final String serviceName) { if (serviceName.equalsIgnoreCase(Names.INTERMEDIATE_SERVICE)) { return Objects.castTo(serviceClass, myInterSeance); } else { return myInterSeance.getSpecificService(serviceClass, serviceName); } } }
@Override @Nullable public synchronized <I> I getSpecificService(@NotNull final Class<I> serviceClass, @NotNull @MagicConstant(valuesFromClass = Names.class) final String serviceName) throws ClassCastException { checkIsNotClosed(); return myOriginalSession.getSpecificService(serviceClass, serviceName); }
@TargetApi(Build.VERSION_CODES.GINGERBREAD) @MagicConstant(intValues = {ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE, ActivityInfo.SCREEN_ORIENTATION_SENSOR, ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE}) public int getLandscapeOrientation() { return isForceLandscape() ? isReversedLandscape() ? ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_SENSOR; } }
public static Border createBorder(@MagicConstant(flagsFromClass = SideBorder.class) int borders) { return new SideBorder(getBorderColor(), borders); }
@Nullable private static NotNullFunction<OrderEntry, VirtualFile[]> computeRootProvider(@MagicConstant(valuesFromClass = MonkeyParameters.class) int classPathType, final Sdk sdk) { return (classPathType & SDK_ONLY) == 0 ? null : (NotNullFunction<OrderEntry, VirtualFile[]>) orderEntry -> { if (orderEntry instanceof JdkOrderEntry) { return sdk.getRootProvider().getFiles(OrderRootType.CLASSES); } return orderEntry.getFiles(OrderRootType.CLASSES); }; }
@NotNull public static SkuMappingException newInstance(@MagicConstant( intValues = {REASON_SKU, REASON_STORE_NAME, REASON_STORE_SKU}) int reason) { switch (reason) { case REASON_SKU: return new SkuMappingException("Sku can't be null or empty value."); case REASON_STORE_NAME: return new SkuMappingException("Store name can't be null or empty value."); case REASON_STORE_SKU: return new SkuMappingException("Store sku can't be null or empty value."); default: return new SkuMappingException(); } }
private static OrderRootsEnumerator configureEnumerator(OrderEnumerator enumerator, @MagicConstant(valuesFromClass = MonkeyParameters.class) int classPathType, Sdk jdk) { if ((classPathType & SDK_ONLY) == 0) { enumerator = enumerator.withoutSdk(); } if ((classPathType & TESTS_ONLY) == 0) { enumerator = enumerator.productionOnly(); } OrderRootsEnumerator rootsEnumerator = enumerator.classes(); final NotNullFunction<OrderEntry, VirtualFile[]> provider = computeRootProvider(classPathType, jdk); if (provider != null) { rootsEnumerator = rootsEnumerator.usingCustomRootProvider(provider); } return rootsEnumerator; }
public void configureByModule(final Module module, @MagicConstant(valuesFromClass = MonkeyParameters.class) final int classPathType, boolean forTests) throws CantRunException { CompilerModuleExtension extension = CompilerModuleExtension.getInstance(module); if (extension != null) { outputPath = forTests ? extension.getCompilerOutputPathForTests() : extension.getCompilerOutputPath(); } final Sdk moduleSdk = getModuleSdk(module); if ((classPathType & SDK_ONLY) != 0) { if (moduleSdk == null) { throw CantRunException.noJdkConfigured(); } setSdk(moduleSdk); } }