Codota Logo
TypeFieldDescr.getInitExpr
Code IndexAdd Codota to your IDE (free)

How to use
getInitExpr
method
in
org.drools.lang.descr.TypeFieldDescr

Best Java code snippets using org.drools.lang.descr.TypeFieldDescr.getInitExpr (Showing top 3 results out of 315)

  • Common ways to obtain TypeFieldDescr
private void myMethod () {
TypeFieldDescr t =
  • Codota IconString fieldName;new TypeFieldDescr(fieldName)
  • Smart code suggestions by Codota
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

protected TypeFieldDescr buildInheritedFieldDescrFromDefinition( FactField fld, TypeDeclarationDescr typeDescr ) {
  PatternDescr fldType = new PatternDescr();
  TypeFieldDescr inheritedFldDescr = new TypeFieldDescr();
    inheritedFldDescr.setFieldName( fld.getName() );
    fldType.setObjectType( ( (FieldDefinition) fld ).getFieldAccessor().getExtractToClassName() );
    inheritedFldDescr.setPattern( fldType );
  if ( fld.isKey() ) {
    inheritedFldDescr.getAnnotations().put( TypeDeclaration.ATTR_KEY,
                        new AnnotationDescr( TypeDeclaration.ATTR_KEY ) );
  }
    inheritedFldDescr.setIndex( ( (FieldDefinition) fld ).getDeclIndex() );
    inheritedFldDescr.setInherited( true );
    String initExprOverride = ( (FieldDefinition) fld ).getInitExpr();
    int overrideCount = 0;
    // only @aliasing local fields may override defaults.
    for ( TypeFieldDescr localField : typeDescr.getFields().values() ) {
      AnnotationDescr ann = localField.getAnnotation( "Alias" );
      if ( ann != null && fld.getName().equals( ann.getSingleValue().replaceAll( "\"", "" ) ) && localField.getInitExpr() != null ) {
        overrideCount++;
        initExprOverride = localField.getInitExpr();
      }
    }
    if ( overrideCount > 1 ) {
      // however, only one is allowed
      initExprOverride = null;
    }
    inheritedFldDescr.setInitExpr( initExprOverride );
  return inheritedFldDescr;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

  return false;
} else {
  String initVal = fieldMap.get( fieldName ).getInitExpr();
  if (typeDescr.getFields().get( fieldName ).getInitExpr() == null) {
    typeDescr.getFields().get( fieldName ).setInitExpr( initVal );
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

fieldDef.setInitExpr( field.getInitExpr() );
org.drools.lang.descrTypeFieldDescrgetInitExpr

Popular methods of TypeFieldDescr

  • <init>
  • getPattern
  • setPattern
  • addAnnotation
  • getAnnotation
  • getAnnotationNames
  • getAnnotations
  • getFieldName
  • getIndex
  • getLine
  • getNamespace
  • getResource
  • getNamespace,
  • getResource,
  • isInherited,
  • setFieldName,
  • setIndex,
  • setInherited,
  • setInitExpr,
  • setResource

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • onRequestPermissionsResult (Fragment)
  • setContentView (Activity)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now