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

How to use
BooleanLiteralExpr
in
japa.parser.ast.expr

Best Java code snippets using japa.parser.ast.expr.BooleanLiteralExpr (Showing top 15 results out of 315)

origin: com.google.code.javaparser/javaparser

@Override
public Node visit(BooleanLiteralExpr _n, Object _arg) {
  Comment comment = cloneNodes(_n.getComment(), _arg);
  BooleanLiteralExpr r = new BooleanLiteralExpr(
      _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
      _n.getValue()
  );
  r.setComment(comment);
  return r;
}
origin: com.google.code.javaparser/javaparser

public BooleanLiteralExpr(int beginLine, int beginColumn, int endLine, int endColumn, boolean value) {
  super(beginLine, beginColumn, endLine, endColumn);
  setValue(value);
}
origin: com.google.code.javaparser/javaparser

@Override public void visit(final BooleanLiteralExpr n, final Object arg) {
  printJavaComment(n.getComment(), arg);
  printer.print(String.valueOf(n.getValue()));
}
origin: org.kuali.rice/rice-development-tools

  private AnnotationExpr createJoinColumn(FieldDescriptor thisField, FieldDescriptor itemField) {
    final List<MemberValuePair> pairs = new ArrayList<MemberValuePair>();

    pairs.add(new MemberValuePair("name", new StringLiteralExpr(thisField.getColumnName())));
    pairs.add(new MemberValuePair("referencedColumnName", new StringLiteralExpr(itemField.getColumnName())));
    if (!isAnonymousFk(thisField)) {
      pairs.add(new MemberValuePair("insertable", new BooleanLiteralExpr(false)));
      pairs.add(new MemberValuePair("updatable", new BooleanLiteralExpr(false)));
    }

    // Per this page: https://forums.oracle.com/message/3923913
    // the nullable attribute is a hint to the DDL generation, especially on fields like this.
    // Commenting this flag out for now as it's just "noise" in the annotation definitions
//        if (!isNullableFk(thisField)) {
//            pairs.add(new MemberValuePair("nullable", new BooleanLiteralExpr(false)));
//        }
    return new NormalAnnotationExpr(new NameExpr("JoinColumn"), pairs);
  }

origin: com.google.code.javaparser/javaparser

@Override public Boolean visit(final BooleanLiteralExpr n1, final Node arg) {
  final BooleanLiteralExpr n2 = (BooleanLiteralExpr) arg;
  if (n1.getValue() != n2.getValue()) {
    return Boolean.FALSE;
  }
  return Boolean.TRUE;
}
origin: com.google.code.javaparser/javaparser

@Override public void visit(final BooleanLiteralExpr n, final A arg) {
  visitComment(n.getComment(), arg);
}
origin: com.google.code.javaparser/javaparser

final public Expression BooleanLiteral() throws ParseException {
   Expression ret;
 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 case TRUE:
  jj_consume_token(TRUE);
         ret = new BooleanLiteralExpr(token.beginLine, token.beginColumn, token.endLine, token.endColumn, true);
  break;
 case FALSE:
  jj_consume_token(FALSE);
         ret = new BooleanLiteralExpr(token.beginLine, token.beginColumn, token.endLine, token.endColumn, false);
  break;
 default:
  jj_la1[95] = jj_gen;
  jj_consume_token(-1);
  throw new ParseException();
 }
  {if (true) return ret;}
 throw new Error("Missing return statement in function");
}
origin: org.jvnet.annox/annox

  @Override
  public XAnnotationValue<Boolean> visit(BooleanLiteralExpr n, Void arg) {
    return new XBooleanAnnotationValue(n.getValue());
  }
}
origin: org.chromattic/chromattic.testgenerator

final public Expression BooleanLiteral() throws ParseException {
   Expression ret;
 switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
 case TRUE:
  jj_consume_token(TRUE);
         ret = new BooleanLiteralExpr(token.beginLine, token.beginColumn, token.endLine, token.endColumn, true);
  break;
 case FALSE:
  jj_consume_token(FALSE);
         ret = new BooleanLiteralExpr(token.beginLine, token.beginColumn, token.endLine, token.endColumn, false);
  break;
 default:
  jj_la1[94] = jj_gen;
  jj_consume_token(-1);
  throw new ParseException();
 }
 {if (true) return ret;}
 throw new Error("Missing return statement in function");
}
origin: org.chromattic/chromattic.testgenerator

public void visit(BooleanLiteralExpr n, Object arg) {
  printer.print(String.valueOf(n.getValue()));
}
origin: com.google.code.javaparser/javaparser

public BooleanLiteralExpr(boolean value) {
  setValue(value);
}
origin: org.kuali.rice/rice-development-tools

final String access = fd.getAccess();
if ("readonly".equals(access)) {
  pairs.add(new MemberValuePair("insertable", new BooleanLiteralExpr(false)));
  pairs.add(new MemberValuePair("updatable", new BooleanLiteralExpr(false)));
} else if ("readwrite".equals(access)) {
  LOG.debug(ResolverUtil.logMsgForField(enclosingClass, fieldName, mappedClass) + " field access is readwrite keeping @Column attributes (insertable, updatable) at defaults");
  pairs.add(new MemberValuePair("nullable", new BooleanLiteralExpr(false)));
} else {
  LOG.debug(ResolverUtil.logMsgForField(enclosingClass, fieldName, mappedClass) + " field is nullable keeping @Column attribute (nullable) at default");
origin: org.kuali.rice/rice-development-tools

private NodeAndImports<MethodDeclaration> createPrimaryKeyEquals(Collection<FieldDescriptor> primaryKeyDescriptors, String enclosingClassName) {
  final MethodDeclaration equals = new MethodDeclaration(ModifierSet.PUBLIC, new PrimitiveType(PrimitiveType.Primitive.Boolean), "equals",
      Collections.singletonList(new Parameter(new ClassOrInterfaceType("Object"), new VariableDeclaratorId("other"))));
  equals.setAnnotations(Collections.<AnnotationExpr>singletonList(new MarkerAnnotationExpr(new NameExpr("Override"))));
  final Statement ifEqualNullStmt = new IfStmt(new BinaryExpr(new NameExpr("other"), new NullLiteralExpr(), BinaryExpr.Operator.equals), new ReturnStmt(new BooleanLiteralExpr(false)), null);
  final Statement ifEqualThisStmt = new IfStmt(new BinaryExpr(new NameExpr("other"), new ThisExpr(), BinaryExpr.Operator.equals), new ReturnStmt(new BooleanLiteralExpr(true)), null);
  final Statement ifEqualClassStmt = new IfStmt(new BinaryExpr(new MethodCallExpr(new NameExpr("other"), "getClass"), new MethodCallExpr(new ThisExpr(), "getClass"), BinaryExpr.Operator.notEquals), new ReturnStmt(new BooleanLiteralExpr(false)), null);
  final Statement rhsStmt = new ExpressionStmt(new VariableDeclarationExpr(ModifierSet.FINAL,
      new ClassOrInterfaceType(enclosingClassName), Collections.singletonList(new VariableDeclarator(
      new VariableDeclaratorId("rhs"),
      new CastExpr(new ClassOrInterfaceType(enclosingClassName), new NameExpr("other"))))));
  Expression equalsBuilderExpr = new ObjectCreationExpr(null, new ClassOrInterfaceType("EqualsBuilder"), Collections.<Expression>emptyList());
  for (FieldDescriptor f : primaryKeyDescriptors) {
    final List<Expression> args = new ArrayList<Expression>();
    args.add(new FieldAccessExpr(new ThisExpr(), f.getAttributeName()));
    args.add(new FieldAccessExpr(new NameExpr("rhs"), f.getAttributeName()));
    equalsBuilderExpr = new MethodCallExpr(equalsBuilderExpr, "append", args);
  }
  equalsBuilderExpr = new MethodCallExpr(equalsBuilderExpr, "isEquals");
  final List<Statement> statements = new ArrayList<Statement>();
  statements.add(ifEqualNullStmt);
  statements.add(ifEqualThisStmt);
  statements.add(ifEqualClassStmt);
  statements.add(rhsStmt);
  statements.add(new ReturnStmt(equalsBuilderExpr));
  final BlockStmt equalsBody = new BlockStmt(statements);
  equals.setBody(equalsBody);
  return new NodeAndImports<MethodDeclaration>(equals,
      Collections.singleton(new ImportDeclaration(new QualifiedNameExpr(new NameExpr("org.apache.commons.lang.builder"), "EqualsBuilder"), false, false)));
}
origin: org.kuali.rice/rice-development-tools

} else if (autoDelete == ObjectReferenceDescriptor.CASCADE_OBJECT) {
  cascadeTypes.add(new NameExpr("CascadeType.REMOVE"));
  pairs.add(new MemberValuePair("orphanRemoval", new BooleanLiteralExpr(true)));
} else {
  LOG.error(ResolverUtil.logMsgForField(enclosingClass, fieldName, mappedClass) + " field has auto-delete set to an invalid value");
origin: org.kuali.rice/rice-development-tools

} else if (autoDelete == ObjectReferenceDescriptor.CASCADE_OBJECT) {
  cascadeTypes.add(new NameExpr("CascadeType.REMOVE"));
  pairs.add(new MemberValuePair("orphanRemoval", new BooleanLiteralExpr(true)));
} else {
  LOG.error(ResolverUtil.logMsgForField(enclosingClass, fieldName, mappedClass) + " field has auto-delete set to an invalid value");
japa.parser.ast.exprBooleanLiteralExpr

Most used methods

  • <init>
  • getValue
  • getBeginColumn
  • getBeginLine
  • getComment
  • getEndColumn
  • getEndLine
  • setComment
  • setValue

Popular in Java

  • Reading from database using SQL prepared statement
  • findViewById (Activity)
  • getSystemService (Context)
  • getResourceAsStream (ClassLoader)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Best IntelliJ plugins
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