Package org.jboss.errai.codegen.framework.meta

Examples of org.jboss.errai.codegen.framework.meta.MetaField


              ctx.recordObjectHash(hash, newInstance);
            }

            for (MemberMapping mapping : definition.getWritableMemberMappings()) {
              if (mapping.getBindingMember() instanceof MetaField) {
                MetaField f = (MetaField) mapping.getBindingMember();
                setProperty(newInstance, f.asField(),
                        ctx.demarshall(mapping.getType().asClass(), oMap.get(mapping.getKey())));
              }
              else {
                Method m = ((MetaMethod) mapping.getBindingMember()).asMethod();
                m.invoke(newInstance, DataConversion.convert(
View Full Code Here


      if (!hasEncoded) {
        sb.append(",");
        hasEncoded = true;
      }

      MetaField metaField = MetaClassFactory.get(field);
      MetaClass targetType = GenUtil.getPrimitiveWrapper(metaField.getType());

      if (!context.hasProvidedOrGeneratedMarshaller(targetType.getFullyQualifiedName())) {
        throw new NoAvailableMarshallerException(targetType.getFullyQualifiedName());
      }
View Full Code Here

    super(decoratesWith);
  }

  @Override
  public Statement generateDecorator(InjectableInstance<ReplyTo> injectableInstance) {
    final MetaField field = injectableInstance.getField();
    final ReplyTo context = field.getAnnotation(ReplyTo.class);

     return Stmt.nestedCall(injectableInstance.getValueStatement())
             .invoke("setReplyTo", context.value());
  }
View Full Code Here

    super(decoratesWith);
  }

  @Override
  public Statement generateDecorator(InjectableInstance<ToSubject> injectableInstance) {
    final MetaField field = injectableInstance.getField();
    final ToSubject context = field.getAnnotation(ToSubject.class);

    return Stmt.nestedCall(injectableInstance.getValueStatement())
            .invoke("setToSubject", context.value());
  }
View Full Code Here

            for (Field method : fields) {
              final Annotation aInstance = method.getAnnotation(aClass);

              final MetaClass type = MetaClassFactory.get(method.getDeclaringClass());
              final MetaField metaField = MetaClassFactory.get(method);

              entry.addProcessingDelegate(new ProcessingDelegate<MetaField>() {
                @Override
                public boolean process() {
                  injectorFactory.addType(type);
View Full Code Here

                           final Class<? extends Annotation> annoClass,
                           final IOCProcessingContext context) {

    final Annotation anno = field.getAnnotation(annoClass);
    final MetaClass type = MetaClassFactory.get(field.getDeclaringClass());
    final MetaField metaField = MetaClassFactory.get(field);

    dependencyControl.masqueradeAs(type);

    ProcessingDelegate<MetaField> del = new ProcessingDelegate<MetaField>() {
      @Override
View Full Code Here

  }

  @Override
  public MetaField getField(String name) {
    try {
      MetaField mFld;
      if ("length".equals(name) && getEnclosedMetaObject().isArray()) {
        mFld = new MetaField.ArrayLengthMetaField(this);
      }
      else {
        mFld = new JavaReflectionField(getEnclosedMetaObject().getField(name));
View Full Code Here

  }

  @Override
  public MetaField getDeclaredField(String name) {
    try {
      MetaField mFld;

      if ("length".equals(name) && getEnclosedMetaObject().isArray()) {
        mFld = new MetaField.ArrayLengthMetaField(this);
      }
      else {
View Full Code Here

  }

  @Override
  public MetaField getField(String name) {
    try {
      MetaField mFld;
      if ("length".equals(name) && getEnclosedMetaObject().isArray()) {
        mFld = new MetaField.ArrayLengthMetaField(this);
      }
      else {
        mFld = new JavaReflectionField(getEnclosedMetaObject().getField(name));
View Full Code Here

  }

  @Override
  public MetaField getDeclaredField(String name) {
    try {
      MetaField mFld;

      if ("length".equals(name) && getEnclosedMetaObject().isArray()) {
        mFld = new MetaField.ArrayLengthMetaField(this);
      }
      else {
View Full Code Here

TOP

Related Classes of org.jboss.errai.codegen.framework.meta.MetaField

Copyright © 2018 www.massapicom. 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.