Examples of JavaField


Examples of javax.tools.diagnostics.runtime.java.JavaField

          if (next2 instanceof CorruptData) {
            continue;
          }

          JavaField field = (JavaField) next2;
          String id = null;

          if ("id".equals(field.getName())) {
            id = field.getString(monitorObjectCandidate);
          }

          if (id != null) {

            MonitorThreadConfig config = setup.findMonitorThreadConfig(id);
View Full Code Here

Examples of no.hal.jex.JavaField

            return method;
          }
        }
      }
    } else if (jexElement instanceof JavaField) {
      JavaField jexField = (JavaField) jexElement;
      Class<?> javaClass = (Class<?>) getReflectiveElement(jexField.getOwner());
      if (javaClass != null) {
        try {
          Field javaField = javaClass.getField(jexField.getSimpleName());
          if (ReflectiveRequirementChecker.testTypeString(jexField.getType(), javaField.getType()) == Boolean.TRUE) {
            return javaField;
          }
        } catch (SecurityException e) {
        } catch (NoSuchFieldException e) {
        }
View Full Code Here

Examples of org.ajax4jsf.builder.model.JavaField

  @Override
  public void process(PropertyBean propertyBean, JavaClass javaClass,
      JSFGeneratorConfiguration configuration) {

    JavaField field = getField(propertyBean, configuration);
    JavaMethod accessor = getAccessor(configuration, propertyBean, field);
    JavaMethod mutator = getMutator(configuration, propertyBean, field);
   
    if("action".equals(propertyBean.getName())) {
     
      try {
        accessor.setMethodBody(new VelocityMethodBody(configuration) {
          @Override
          public String getTemplate() {
            return "snippets/get-action.vm";
          }
        });
        mutator.setMethodBody(new VelocityMethodBody(configuration) {
          @Override
          public String getTemplate() {
            return "snippets/set-action.vm";
          }
        });
       
      } catch (GeneratorException e) {
        e.printStackTrace();
      }
     
    } else  {
      javaClass.addField(field);
    }

    if (field.getType().getName().equals(MethodBinding.class.getName())) {
     
      for(JavaLanguageElement el : new JavaLanguageElement[] {field, accessor, mutator}) {
        el.addAnnotation(SuppressWarnings.class, "\"deprecation\"");
      }
     
View Full Code Here

Examples of org.apache.cxf.tools.common.model.JavaField

    private void buildBeanFields(final Class exceptionClass, final JavaClass jClass) {
        Map<String, JavaField> fields = new TreeMap<String, JavaField>();
       
        for (Method method : exceptionClass.getMethods()) {
            if (isIncludedGetter(method)) {
                JavaField field = new JavaField(getFieldName(method),
                                                method.getReturnType().getName(),
                                                "");
                field.setOwner(jClass);
                fields.put(field.getName(), field);
            }
        }
        for (Map.Entry<String, JavaField> ent : fields.entrySet()) {
            jClass.addField(ent.getValue());
            jClass.appendGetter(ent.getValue());
View Full Code Here

Examples of org.apache.jdo.model.java.JavaField

        affirm(classPath);
        affirm(fieldName);
        final String className = classPath.replace('/', '.');
        try {
            final JavaType javaType = javaModel.getJavaType(className);
            final JavaField javaField = javaType.getJavaField(fieldName);
            final JavaType declaringClass = javaField.getDeclaringClass();
            return declaringClass.getName().replace('.', '/');
        } catch (ModelFatalException ex) {
            throw new EnhancerMetaDataUserException(ex);
        }
    }
View Full Code Here

Examples of org.apache.jdo.model.java.JavaField

        try {
            final JDOClass clazz = getJDOClass(classPath);
            JavaType javaClass = clazz.getJavaType();
            affirm(javaClass != null,
                   "cannot find class file for class: " + classPath);
            JavaField javaField = javaClass.getJavaField(fieldName);
            affirm(javaField != null,
                   "cannot find java field " + classPath + "." + fieldName);
            JavaType fieldType = javaField.getType();
            JDOField field = clazz.getField(fieldName);
            // if field not known by JDOClass (not specified in JDO XML),
            // create the field only if the model's method of default
            // calculation would yield a persistent field.  We must not
            // change the models state by newly created fields with
View Full Code Here

Examples of org.apache.jdo.model.java.JavaField

    /**
     * Get the JavaType representation of the type of the field.
     * @return JavaType representation of the type of this field.
     */
    public JavaType getType() {
        JavaField field = getJavaField();
        return (field == null) ? null : field.getType();
    }
View Full Code Here

Examples of org.apache.jdo.model.java.JavaField

     * @return the JavaField instance for the specified field in this class
     * or <code>null</code> if there is no such field.
     */
    public JavaField getJavaField(String fieldName)
    {
        JavaField javaField = getDeclaredJavaField(fieldName);
        if (javaField == null) {
            // check superclass
            JavaType superclass = getSuperclass();
            if ((superclass != null) &&
                (superclass != PredefinedType.objectType)) {
View Full Code Here

Examples of org.apache.jdo.model.java.JavaField

     * @param fieldName the name of the field
     * @return the JavaField instance for the specified field in this class
     */
    public synchronized JavaField getDeclaredJavaField(String fieldName)
    {
        JavaField javaField = (JavaField)declaredJavaFields.get(fieldName);
        if (javaField == null) {
            JDOClass jdoClass = getJDOClass();
            if (jdoClass != null) {
                // pc class => look for JDOField first
                if (jdoClass.getDeclaredField(fieldName) != null) {
View Full Code Here

Examples of org.apache.jdo.model.java.JavaField

        Field[] fields = ReflectionJavaField.getDeclaredFieldsPrivileged(clazz);
        for (int i = 0; i < fields.length; i++) {
            Field field = fields[i];
            String fieldName = field.getName();
            if (declaredJavaFields.get(fieldName) == null) {
                JavaField javaField = newJavaFieldInstance(field);
                declaredJavaFields.put(fieldName, javaField);
            }
        }
    }
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.