Examples of IField


Examples of it.eng.spagobi.tools.dataset.common.datastore.IField

   * @param record
   * @param startPosition
   * @param endPosition
   */
  private void addRecord(Node root, IRecord record, int startPosition, int endPosition){
    IField field;
    Node node;
    Node nodeToCheck = root;
    int nodePosition;
   
    List<IField> fields= new ArrayList<IField>();
    fields = record.getFields();
    for(int indexFields = startPosition; indexFields<endPosition; indexFields++){
      field = fields.get(indexFields);
      if (field.getValue() != null) {
        node = new Node(field.getValue().toString());
      } else {
        node = new Node("null");
      }
      nodePosition = nodeToCheck.getChilds().indexOf(node);
      if(nodePosition<0){
View Full Code Here

Examples of net.janino.IClass.IField

                this.value = new ArrayLength(
                    this.getLocation(),
                    this.lhs.toRvalueOrCE()
                );
            } else {
                IField iField = Java.findIField(lhsType, this.fieldName, this.getLocation());
                if (iField == null) {
                    this.compileError("\"" + this.lhs.getType().toString() + "\" has no field \"" + this.fieldName + "\"");
                    this.value = new Rvalue(this.getLocation()) {
                        public IClass compileGet() throws CompileException { return Java.getIClassLoader().OBJECT; }
                        public IClass getType() throws CompileException { return Java.getIClassLoader().OBJECT; }
View Full Code Here

Examples of net.janino.IClass.IField

        public IClass.IField[] getIFields() {
            IClass.IField[] res = new IClass.IField[this.variableDeclarators.length];
            for (int i = 0; i < res.length; ++i) {
                final VariableDeclarator vd = this.variableDeclarators[i];
                res[i] = this.declaringType.new IField() {

                    // Implement IMember.
                    public int getAccess() {
                        switch (FieldDeclarator.this.modifiers & Mod.PPP) {
                        case Mod.PRIVATE:
View Full Code Here

Examples of net.janino.IClass.IField

                if (icd == null) {
                    return new LocalVariableAccess(location, lv);
                } else {
                    if (!lv.finaL) Java.compileError("Cannot access non-final local variable \"" + identifier + "\" from inner class");
                    final IClass lvType = lv.type;
                    IClass.IField iField = ((IClass) icd).new IField() {
                        public Object  getConstantValue() { return null; }
                        public String  getName()          { return "val$" + identifier; }
                        public IClass  getType()          { return lvType; }
                        public boolean isStatic()         { return false; }
                        public int     getAccess()        { return IClass.PACKAGE; }
View Full Code Here

Examples of net.janino.IClass.IField

        }
        for (; i < j; ++i) {
            final String fieldName = "this$" + (path.size() - i - 2);
            final IClass inner = (IClass) path.get(i);
            final IClass outer = (IClass) path.get(i + 1);
            ((InnerClassDeclaration) inner).defineSyntheticField(inner.new IField() {
                public Object  getConstantValue() { return null; }
                public String  getName()          { return fieldName; }
                public IClass  getType()          { return outer; }
                public boolean isStatic()         { return false; }
                public int     getAccess()        { return IClass.PACKAGE; }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IField

protected void initializeDefaultPosition() {
  IType parentElement = getType();
  try {
    IField[] fields = parentElement.getFields();
    if (fields != null && fields.length > 0) {
      final IField lastField = fields[fields.length - 1];
      if (parentElement.isEnum()) {
        IField field = lastField;
        if (!field.isEnumConstant()) {
          createAfter(lastField);
        }
      } else {
        createAfter(lastField);
      }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IField

        start, end);
    if(type != null) {
      try {
        IField[] fields = type.getFields();
        for (int i = 0; i < fields.length; i++) {
          IField field = fields[i];
          ISourceRange range = field.getNameRange();
          if(range.getOffset() <= start
              && range.getOffset() + range.getLength() >= end
              && field.getElementName().equals(new String(name))) {
            addElement(fields[i]);
            if(SelectionEngine.DEBUG){
              System.out.print("SELECTION - accept field("); //$NON-NLS-1$
              System.out.print(field.toString());
              System.out.println(")"); //$NON-NLS-1$
            }
            return; // only one method is possible
          }
        }
      } catch (JavaModelException e) {
        return;
      }
    }
  } else {
    IType type= resolveType(declaringTypePackageName, declaringTypeName, NameLookup.ACCEPT_ALL);
    if (type != null) {
      IField field= type.getField(new String(name));
      if (field.exists()) {
        if (uniqueKey != null) {
          if(field.isBinary()) {
            ResolvedBinaryField resolvedField = new ResolvedBinaryField(
                (JavaElement)field.getParent(),
                field.getElementName(),
                new String(uniqueKey));
            resolvedField.occurrenceCount = field.getOccurrenceCount();
            field = resolvedField;
          } else {
            ResolvedSourceField resolvedField = new ResolvedSourceField(
                (JavaElement)field.getParent(),
                field.getElementName(),
                new String(uniqueKey));
            resolvedField.occurrenceCount = field.getOccurrenceCount();
            field = resolvedField;
          }
        }
        addElement(field);
        if(SelectionEngine.DEBUG){
          System.out.print("SELECTION - accept field("); //$NON-NLS-1$
          System.out.print(field.toString());
          System.out.println(")"); //$NON-NLS-1$
        }
      }
    }
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IField

    SourceTypeBinding typeBinding = (SourceTypeBinding)fieldBinding.declaringClass;
    res = findLocalElement(typeBinding.sourceStart());
  }
  if (res != null && res.getElementType() == IJavaElement.TYPE) {
    IType type = (IType) res;
    IField field= type.getField(new String(fieldBinding.name));
    if (field.exists()) {
      char[] uniqueKey = fieldBinding.computeUniqueKey();
      if(field.isBinary()) {
        ResolvedBinaryField resolvedField = new ResolvedBinaryField(
            (JavaElement)field.getParent(),
            field.getElementName(),
            new String(uniqueKey));
        resolvedField.occurrenceCount = field.getOccurrenceCount();
        field = resolvedField;
      } else {
        ResolvedSourceField resolvedField = new ResolvedSourceField(
            (JavaElement)field.getParent(),
            field.getElementName(),
            new String(uniqueKey));
        resolvedField.occurrenceCount = field.getOccurrenceCount();
        field = resolvedField;
      }
      addElement(field);
      if(SelectionEngine.DEBUG){
        System.out.print("SELECTION - accept field("); //$NON-NLS-1$
        System.out.print(field.toString());
        System.out.println(")"); //$NON-NLS-1$
      }
    }
  }
}
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IField

    return;
  }
  JavaModelManager manager = JavaModelManager.getJavaModelManager();
  for (int i = 0, fieldCount = fields.length; i < fieldCount; i++) {
    IBinaryField fieldInfo = fields[i];
    IField field = new BinaryField((JavaElement)type, manager.intern(new String(fieldInfo.getName())));
    newElements.put(field, fieldInfo);
    childrenHandles.add(field);
  }
}
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IField

      String fieldName = new String(fieldInfo.name);
      this.memberName[typeDepth] = fieldName;
     
      // categories
      IType currentType = this.types[typeDepth];
      IField field = currentType.getField(fieldName);
      addCategories(field, fieldInfo.categories);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.