Examples of Modifier


Examples of org.dmd.dmc.types.Modifier

   
    @Override
    // org.dmd.dms.util.GenUtility.dumpSETType(GenUtility.java:2659)
    public Modifier add(Object v) throws DmcValueException {
        synchronized(this){
            Modifier rc = typeCheck(v);
            if (value == null)
                initValue();
       
            // If false is returned, we didn't modify the set, so return null
            if (!value.add(rc))
View Full Code Here

Examples of org.dmd.dmc.types.Modifier

   
    @Override
    // org.dmd.dms.util.GenUtility.dumpSETType(GenUtility.java:2676)
    public Modifier del(Object v){
        synchronized(this){
            Modifier rc = null;
            if (value == null)
                return(rc);
           
            try {
                rc = typeCheck(v);
View Full Code Here

Examples of org.dmd.dmc.types.Modifier

        synchronized(this){
            if (value == null)
                return(false);
           
            try {
                Modifier val = typeCheck(v);
                return(value.contains(val));
            } catch (DmcValueException e) {
                return(false);
            }
        }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Modifier

    /**
     * Set the abstract flag for this class.
     */
    public void setAbstract() {
        if (m_class instanceof TypeDeclaration) {
            Modifier modifier = m_source.getAST().newModifier(Modifier.ModifierKeyword.ABSTRACT_KEYWORD);
            ((TypeDeclaration)m_class).modifiers().add(modifier);
        } else {
            // should not be possible, but just in case of added types in future
            throw new IllegalStateException("Internal error - abstract not supported for class type");
        }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Modifier

      List modifiers = method.modifiers();
      boolean isPublic = false;
      for (Object mod : modifiers) {
        IExtendedModifier exm = (IExtendedModifier) mod;
        if (exm instanceof Modifier) {
          Modifier m = (Modifier) exm;
          if (m.getKeyword().equals(ModifierKeyword.PUBLIC_KEYWORD)) {
            isPublic = true;
          }
        }
      }
      if (!isPublic)
        return false;
      boolean isLM = false;
      List params = method.parameters();
      for (Method m : lMethods) {
        if (m.getName().equals(method.getName().getFullyQualifiedName())) {
          if (params != null && params.size() == 1) {
            SingleVariableDeclaration svd = (SingleVariableDeclaration) params.get(0);
            if (!svd.isVarargs()) {
              Type type = svd.getType();
              if (!type.isArrayType() && !type.isParameterizedType() && !type.isPrimitiveType() && !type.isWildcardType()) {
                Class<?>[] types = m.getParameterTypes();
                Class evtType = types[0];
                if (type.isQualifiedType()) {
                  QualifiedType qt = (QualifiedType) type;
                  if (qt.getName().getFullyQualifiedName().equals(evtType.getName())) {
                    isLM = true;
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Modifier

        if (!target.getElementName().equals(
            dropTypeDec.getName().toString() + ".java")) {
          List<?> modifiers = dropTypeDec.modifiers();
          for (Object mod : modifiers) {
            if (mod instanceof Modifier) {
              Modifier modifier = (Modifier) mod;
              if (modifier.getKeyword().toString()
                  .equals("public")) {
                dropTypeDec.modifiers().remove(modifier);
                break;
              }
            }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Modifier

        assert bug != null;

        TypeDeclaration type = getTypeDeclaration(workingUnit, bug.getPrimaryClass());
        FieldDeclaration field = getFieldDeclaration(type, bug.getPrimaryField());

        Modifier finalModifier = workingUnit.getAST().newModifier(getModifierToAdd());

        ListRewrite modRewrite = rewrite.getListRewrite(field, FieldDeclaration.MODIFIERS2_PROPERTY);
        modRewrite.insertLast(finalModifier, null);
    }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Modifier

      variableDeclaration.setName(typeDeclaration.getAST().newSimpleName(fieldName));

      FieldDeclaration fieldDeclaration = typeDeclaration.getAST().newFieldDeclaration(variableDeclaration);
      Type type = JDTUtils.createQualifiedType(compilationUnit.getAST(), fieldType);
      fieldDeclaration.setType(type);
      Modifier privateModifier = fieldDeclaration.getAST().newModifier(ModifierKeyword.PRIVATE_KEYWORD);
      fieldDeclaration.modifiers().add(privateModifier);
      typeDeclaration.bodyDeclarations().add(fieldDeclaration);
    } catch (Exception e) {
      warnings.add(String.format(Messages.getString("org.apache.openejb.helper.annotation.warnings.11"), fieldName, targetClass)); //$NON-NLS-1$
    }
View Full Code Here

Examples of org.jemmy.interfaces.Modifier

     */
    public Modifier[] convertModifiers(int modifiers) {
        List<Modifier> result = new ArrayList<Modifier>();
        for (int key : int2modifier.keySet()) {
            if ((key & modifiers) != 0) {
                Modifier res = int2modifier.get(key);
                if (res == null) {
                    throw new JemmyException("Unable to recognize modifiers", modifiers);
                }
                result.add(res);
            }
View Full Code Here

Examples of voodoo.collection.gameplay.Modifier

     * @param Resource to get.
     * @return The resource.
     */
    public Modifier getResource(int resource) {
      if ( _resources[resource] == null ) {
        _resources[resource] = new Modifier();
      }

      return _resources[resource];
    }
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.