congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
MagicConstant.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.intellij.lang.annotations.MagicConstant
constructor

Best Java code snippets using org.intellij.lang.annotations.MagicConstant.<init> (Showing top 20 results out of 315)

origin: go-lang-plugin-org/go-lang-idea-plugin

private void command(@NotNull @MagicConstant(stringValues = {NEXT, CONTINUE, HALT, SWITCH_THREAD, STEP}) String name) {
 send(new DlvRequest.Command(name)).done(myStateConsumer);
}
origin: org.onepf/openiab

@MagicConstant(intValues = {SETUP_DISPOSED, SETUP_IN_PROGRESS,
    SETUP_RESULT_FAILED, SETUP_RESULT_NOT_STARTED, SETUP_RESULT_SUCCESSFUL})
public int getSetupState() {
  return setupState;
}
origin: org.onepf/openiab

/**
 * 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;
}
origin: com.android.tools.layoutlib/layoutlib-api

/**
 * Returns if the IDE supports the requested feature.
 * @see Features
 * @since API 15
 */
public abstract boolean supports(
    @MagicConstant(valuesFromClass = Features.class) int ideFeature);
origin: org.onepf/openiab

/**
 * 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;
}
origin: org.onepf/openiab

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;
}
origin: antlr/intellij-plugin-v4

  public static TokenIElementType getTokenElementType(@MagicConstant(valuesFromClass = ANTLRv4Lexer.class)int ruleIndex){
    return TOKEN_ELEMENT_TYPES.get(ruleIndex);
  }
}
origin: antlr/intellij-plugin-v4

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){
origin: com.github.adedayo.intellij.sdk/java-psi-api

public abstract PsiElement shortenClassReferences(@NotNull PsiElement element,
                         @MagicConstant(flags = {DO_NOT_ADD_IMPORTS, INCOMPLETE_CODE}) int flags) throws IncorrectOperationException;
origin: org.onepf/openiab

/**
 * 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;
}
origin: com.github.adedayo.intellij.sdk/java-psi-api

/**
 * 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);
origin: JetBrains/dekaf

 @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);
 }
}
origin: JetBrains/dekaf

 @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);
  }
 }
}
origin: JetBrains/dekaf

@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);
}
origin: smarek/Simple-Dilbert

  @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;
  }
}
origin: JetBrains/jediterm

public static Border createBorder(@MagicConstant(flagsFromClass = SideBorder.class) int borders) {
 return new SideBorder(getBorderColor(), borders);
}
origin: liias/monkey

@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);
 };
}
origin: org.onepf/openiab

@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();
  }
}
origin: liias/monkey

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;
}
origin: liias/monkey

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);
 }
}
org.intellij.lang.annotationsMagicConstant<init>

Popular methods of MagicConstant

    Popular in Java

    • Creating JSON documents from java classes using gson
    • getSupportFragmentManager (FragmentActivity)
    • startActivity (Activity)
    • putExtra (Intent)
    • PrintStream (java.io)
      Fake signature of an existing Java class.
    • Date (java.util)
      A specific moment in time, with millisecond precision. Values typically come from System#currentTime
    • BlockingQueue (java.util.concurrent)
      A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
    • Stream (java.util.stream)
      A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
    • Reference (javax.naming)
    • SAXParseException (org.xml.sax)
      Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
    • Top 17 PhpStorm Plugins
    Tabnine Logo
    • Products

      Search for Java codeSearch for JavaScript code
    • IDE Plugins

      IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Tabnine for your IDE now