Tabnine Logo
BooleanLiteralExpr.<init>
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using japa.parser.ast.expr.BooleanLiteralExpr.<init> (Showing top 8 results out of 315)

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: 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: 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.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: 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: 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<init>

Popular methods of BooleanLiteralExpr

  • getValue
  • getBeginColumn
  • getBeginLine
  • getComment
  • getEndColumn
  • getEndLine
  • setComment
  • setValue

Popular in Java

  • Reactive rest calls using spring rest template
  • addToBackStack (FragmentTransaction)
  • setContentView (Activity)
  • getSharedPreferences (Context)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • JFileChooser (javax.swing)
  • CodeWhisperer alternatives
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