congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
MethodInfo
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: br.com.objectos.way/pojo-plugin

public String name() {
 return methodInfo.fieldName();
}
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.hasName(name);
 }
}
origin: br.com.objectos/way-code

public boolean hasSameSignature(MethodInfo other) {
 return name().equals(other.name())
   && toSimpleTypeList(parameterInfoList()).equals(toSimpleTypeList(other.parameterInfoList()));
}
origin: br.com.objectos/way-code

@Override
public String toString() {
 return name() + "(" + Joiner.on(", ").join(parameterInfoList()) + ")";
}
origin: br.com.objectos/way-code

@Override
public boolean isEqual(MethodInfo that) {
 return Testables.isEqualHelper()
   .equal(name(), that.name())
   .equal(accessInfo(), that.accessInfo())
   .equal(modifierInfoSet(), that.modifierInfoSet())
   .equal(returnTypeInfo(), that.returnTypeInfo())
   .equal(annotationInfoMap(), that.annotationInfoMap())
   .equal(parameterInfoList(), that.parameterInfoList())
   .result();
}
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-code

public ToMustacheHelper toMustacheHelper() {
 List<? extends ParameterInfo> parameterInfoList = parameterInfoList();
 List<IndexedParameterInfo> parameters = WayIterables.from(parameterInfoList)
   .transform(ParameterInfoToIndexedParameterInfo.get(parameterInfoList.size()))
   .toImmutableList();
 return Mustaches.toMustacheHelper()
   .add("name", name())
   .add("methodName", name())
   .add("toClassName", getClassName())
   .add("fieldName", fieldName())
   .add("fieldToClassName", WayCode.upperCaseFirstChar(fieldName()))
   .add("access", accessInfo())
   .add("returnType", returnTypeInfo())
   .add("parameters", parameters)
   .add("parametersIsEmpty", parameters.isEmpty());
}
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 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);
}
origin: br.com.objectos/way-code-pojo

private ParameterSpec parameter(MethodInfo input) {
 SimpleTypeInfo returnTypeInfo = input.returnTypeInfo();
 return ParameterSpec.builder(returnTypeInfo.typeName(), input.fieldName()).build();
}
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

public SimpleTypeInfo returnTypeInfo() {
 return methodInfo.returnTypeInfo();
}
origin: br.com.objectos/way-code

@Override
public String apply(MethodInfo input) {
 return input.name();
}
origin: br.com.objectos/way-code-pojo

@Override
public MethodSpec apply(MethodInfo input) {
 return MethodSpec.methodBuilder(input.name())
   .returns(input.returnTypeInfo().typeName())
   .addCode(body(input))
   .build();
}
origin: br.com.objectos/way-code

public String fieldName() {
 String prefix = getterPrefix();
 String field = name().replace(prefix, "");
 return WayCode.lowerCaseFirstChar(field);
}
origin: br.com.objectos/way-code

@AutoFunctional
public Set<ImportInfo> toImportInfoSet() {
 return WayIterables.from(parameterInfoList())
   .transformAndConcat(ParameterInfoToImportInfo.get())
   .addAll(returnTypeInfo().toImportInfo())
   .toImmutableSet();
}
origin: br.com.objectos/way-code

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

 @Override
 public boolean apply(MethodInfo input) {
  return !input.hasAnnotation(annotationType);
 }
}
origin: br.com.objectos/way-code-pojo

 @Override
 public MethodSpec apply(MethodInfo input) {
  CodeBlock statement = input.statementWriter()
    .add("return $L")
    .setFieldName()
    .write();
  return input.overrideWriter()
    .addCode(statement)
    .write();
 }
}
br.com.objectos.way.codeMethodInfo

Most used methods

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

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (Timer)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Best plugins for Eclipse
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