Tabnine Logo
MethodInfo.hasModifierInfo
Code IndexAdd Tabnine to your IDE (free)

How to use
hasModifierInfo
method
in
br.com.objectos.way.code.MethodInfo

Best Java code snippets using br.com.objectos.way.code.MethodInfo.hasModifierInfo (Showing top 7 results out of 315)

origin: br.com.objectos/way-code

@Override
public boolean apply(MethodInfo input) {
 return input.hasModifierInfo(modifierInfo);
}
origin: br.com.objectos/way-code

 @Override
 public boolean apply(MethodInfo input) {
  return !input.hasModifierInfo(modifierInfo);
 }
}
origin: br.com.objectos.way/testable-pojo-plugin

@Override
public Contribution execute(PojoInfo pojoInfo) {
 return pojoInfo.methodInfoStream()
   .filter(m -> m.hasName("isEqualTo"))
   .filter(m -> m.hasParameterInfoListSize(1))
   .filter(m -> !m.hasModifierInfo(ModifierInfo.ABSTRACT))
   .findFirst()
   .map(m -> Contribution.empty())
   .orElseGet(() -> execute0(pojoInfo));
}
origin: br.com.objectos.way/pojo-plugin

private static List<Property> of0(PojoInfo pojoInfo) {
 return pojoInfo.methodInfoStream()
   .filter(m -> m.hasModifierInfo(ModifierInfo.ABSTRACT))
   .filter(m -> !m.hasReturnTypeInfo(SimpleTypePrimitives.VOID))
   .filter(m -> m.hasParameterInfoListSize(0))
   .filter(m -> !m.hasAnnotation(Invalidate.class))
   .map(m -> new Property(pojoInfo, m))
   .collect(MoreCollectors.toImmutableList());
}
origin: br.com.objectos.way/pojo-plugin

private static List<Property> of0(Mode mode, TypeInfo typeInfo) {
 Naming naming = Naming.of(typeInfo);
 return typeInfo.methodInfoStream()
   .filter(m -> m.hasModifierInfo(ModifierInfo.ABSTRACT))
   .filter(m -> !m.hasReturnTypeInfo(SimpleTypePrimitives.VOID))
   .filter(m -> m.hasParameterInfoListSize(0))
   .filter(m -> !m.hasAnnotation(Invalidate.class))
   .map(m -> new Property(mode, naming, m))
   .collect(MoreCollectors.toImmutableList());
}
origin: br.com.objectos.way/pojo-plugin

void accept(TypeSpec.Builder type) {
 MethodInfoOverrideWriter writer = methodInfo.overrideWriter();
 if (!methodInfo.hasModifierInfo(ModifierInfo.ABSTRACT)) {
  writer.addStatement("super.$L()", methodInfo.name());
 }
 contributionList.forEach(contribution -> contribution.accept(writer));
 if (self) {
  writer.addStatement("return this");
 }
 type.addMethod(writer.write());
}
origin: br.com.objectos.way/pojo-plugin

private static Optional<InvalidateMethod> of1(TypeInfo typeInfo, MethodInfo method, AnnotationInfo annotation) {
 String annotationName = annotation.simpleName();
 if (method.hasModifierInfo(ModifierInfo.FINAL)) {
  method.compilationError("@%s method cannot be final", annotationName);
  return Optional.empty();
 }
 if (method.hasAccessInfo(AccessInfo.PRIVATE)) {
  method.compilationError("@%s method cannot be private", annotationName);
  return Optional.empty();
 }
 SimpleTypeInfo returnTypeInfo = method.returnTypeInfo();
 boolean self = returnTypeInfo.equals(typeInfo.toSimpleTypeInfo());
 if (!returnTypeInfo.equals(SimpleTypePrimitives.VOID) && !self) {
  method.compilationError("@%s method must return void or self", annotationName);
  return Optional.empty();
 }
 InvalidateMethod invalidateMethod = new InvalidateMethod(method, annotation, self);
 return Optional.of(invalidateMethod);
}
br.com.objectos.way.codeMethodInfohasModifierInfo

Popular methods of MethodInfo

  • fieldName
  • hasName
  • hasParameterInfoListSize
  • name
  • returnTypeInfo
  • hasAccessInfo
  • hasAnnotation
  • hasReturnTypeInfo
  • overrideWriter
  • accessInfo
  • annotationInfoAnnotatedWith
  • annotationInfoList
  • annotationInfoAnnotatedWith,
  • annotationInfoList,
  • annotationInfoMap,
  • codeWriter,
  • compilationError,
  • equals,
  • fieldWriter,
  • getClassName,
  • getterPrefix

Popular in Java

  • Parsing JSON documents to java classes using gson
  • putExtra (Intent)
  • getContentResolver (Context)
  • getSharedPreferences (Context)
  • Menu (java.awt)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JFrame (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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