Examples of ClassFile


Examples of org.jibx.binding.classes.ClassFile

            System.out.println("After linking view of binding " + m_name + ':');
            print();
        }
       
        // build the binding factory class
        ClassFile base = ClassCache.requireClassFile(FACTORY_BASE);
        ClassFile cf = new ClassFile(m_factoryName, m_targetRoot, base,
            Constants.ACC_PUBLIC, FACTORY_INTERFACES);
       
        // add static field for instance
        ClassItem inst = cf.addField(FACTORY_INTERFACE,
            FACTORY_INSTNAME, PRIVATESTATIC_ACCESS);
       
        // add private method to return binding classes blob (replaced later)
        MethodBuilder mb = new ExceptionMethodBuilder(CLASSLIST_METHOD_NAME,
            Type.STRING, new Type[0], cf,
            Constants.ACC_PRIVATE|Constants.ACC_STATIC);
        mb.appendACONST_NULL();
        mb.appendReturn(Type.STRING);
        mb.codeComplete(false);
        ClassItem clasblobmeth = mb.addMethod();
       
        // add the private constructor method
        mb = new ExceptionMethodBuilder("<init>", Type.VOID, new Type[0], cf,
            Constants.ACC_PRIVATE);
       
        // start superclass constructor call with name/versions, classes used
        mb.appendLoadLocal(0);
        mb.appendLoadConstant(m_name);
        mb.appendLoadConstant(m_majorVersion);
        mb.appendLoadConstant(m_minorVersion);
        mb.appendCall(clasblobmeth);
       
        // load count of mapped classes
        int count = s_mappedClasses.size();
        int mcnt = m_extraClasses == null ? count : count +
            m_extraClasses.size();
       
        // create argument blob of mapped class names
        String[] names = new String[mcnt];
        for (int i = 0; i < count; i++) {
            names[i] = (String)s_mappedClasses.get(i);
        }
        for (int i = count; i < mcnt; i++) {
            names[i] = (String)m_extraClasses.get(i-count);
        }
        codegenString(buildClassNamesBlob(names), mb);
       
        // create argument blob of unmarshaller class names
        if (m_isInput) {
            for (int i = 0; i < count; i++) {
                String cname = (String)s_mappedClasses.get(i);
                IMapping map = m_activeContext.getMappingAtLevel(cname);
                if (map != null && map.getUnmarshaller() != null) {
                    names[i] = map.getUnmarshaller().getName();
                } else {
                    names[i] = null;
                }
            }
            for (int i = count; i < mcnt; i++) {
                names[i] = (String)m_extraUnmarshallers.get(i-count);
            }
            codegenString(buildClassNamesBlob(names), mb);
        } else {
            mb.appendACONST_NULL();
        }
       
        // create argument blob of marshaller class names
        if (m_isOutput) {
            for (int i = 0; i < count; i++) {
                String cname = (String)s_mappedClasses.get(i);
                IMapping map = m_activeContext.getMappingAtLevel(cname);
                if (map != null && map.getMarshaller() != null) {
                    names[i] = map.getMarshaller().getName();
                } else {
                    names[i] = null;
                }
            }
            for (int i = count; i < mcnt; i++) {
                names[i] = (String)m_extraMarshallers.get(i-count);
            }
            codegenString(buildClassNamesBlob(names), mb);
        } else {
            mb.appendACONST_NULL();
        }
       
        // create argument array of namespace URIs
        String[] nsuris = new String[m_namespaceUris.size()];
        mb.appendLoadConstant(m_namespaceUris.size());
        mb.appendCreateArray("java.lang.String");
        for (int i = 0; i < m_namespaceUris.size(); i++) {
            mb.appendDUP();
            mb.appendLoadConstant(i);
            String uri = (String)m_namespaceUris.get(i);
            mb.appendLoadConstant(uri);
            mb.appendAASTORE();
            nsuris[i] = uri;
        }
       
        // create argument array of namespace prefixes
        if (m_isOutput) {
            mb.appendLoadConstant(m_namespacePrefixes.size());
            mb.appendCreateArray("java.lang.String");
            for (int i = 0; i < m_namespacePrefixes.size(); i++) {
                mb.appendDUP();
                mb.appendLoadConstant(i);
                mb.appendLoadConstant((String)m_namespacePrefixes.get(i));
                mb.appendAASTORE();
            }
        } else {
            mb.appendACONST_NULL();
        }
       
        // create argument blobs of globally mapped element names and URIs
        names = new String[count];
        String[] namespaces = new String[count];
        for (int i = 0; i < count; i++) {
            String cname = (String)s_mappedClasses.get(i);
            IMapping map = m_activeContext.getMappingAtLevel(cname);
            if (map != null) {
                NameDefinition ndef = map.getName();
                if (ndef != null) {
                    names[i] = ndef.getName();
                    namespaces[i] = ndef.getNamespace();
                }
            }
        }
        codegenString(buildNamesBlob(names), mb);
        mb.appendLoadConstant(buildNamespaceIndexBlob(nsuris, namespaces));
       
        // create argument array of class names with unique IDs
        if (m_uniqueIds != null && m_uniqueIds.size() > 0) {
            mb.appendLoadConstant(m_uniqueIds.size());
            mb.appendCreateArray("java.lang.String");
            for (int i = 0; i < m_uniqueIds.size(); i++) {
                mb.appendDUP();
                mb.appendLoadConstant(i);
                mb.appendLoadConstant((String)m_uniqueIds.get(i));
                mb.appendAASTORE();
            }
        } else {
            mb.appendACONST_NULL();
        }
       
        // create argument blobs of abstract mapping information
        GrowableStringArray allnames = new GrowableStringArray();
        int abmapcnt = 0;
        StringBuffer buff = new StringBuffer();
        for (int i = 0; i < count; i++) {
            String tname = (String)s_mappedClasses.get(i);
            IMapping map = m_activeContext.getMappingAtLevel(tname);
            if (map != null && map.isAbstract()) {
                ITypeBinding bind = map.getBinding();
                allnames.add(tname);
                allnames.add(map.getBoundType());
                allnames.add(bind.getCreateMethod());
                allnames.add(bind.getCompleteMethod());
                allnames.add(bind.getPrepareMethod());
                allnames.add(bind.getAttributePresentTestMethod());
                allnames.add(bind.getAttributeUnmarshalMethod());
                allnames.add(bind.getAttributeMarshalMethod());
                allnames.add(bind.getContentPresentTestMethod());
                allnames.add(bind.getContentUnmarshalMethod());
                allnames.add(bind.getContentMarshalMethod());
                abmapcnt++;
                ArrayList nss = map.getNamespaces();
                if (nss == null) {
                    buff.append((char)1);
                } else {
                    buff.append((char)(nss.size()+1));
                    for (int j = 0; j < nss.size(); j++) {
                        NamespaceDefinition nsdef =
                            (NamespaceDefinition)nss.get(j);
                        buff.append((char)(nsdef.getIndex()+1));
                    }
                }
            }
        }
        codegenString(buildClassNamesBlob(allnames.toArray()), mb);
        codegenString(buff.toString(), mb);
       
        // create argument blobs of precompiled base binding names and factories
        int basecount = m_baseBindings.size();
        codegenString(buildNamesBlob(m_baseBindings.toArray()), mb);
        String namesblob = buildClassNamesBlob(m_baseBindingFactories.toArray());
        if (m_closureFactories.size() > 0) {
            namesblob += "|" + buildClassNamesBlob(m_closureFactories.toArray());
        }
        codegenString(namesblob, mb);
       
        // create argument blob for base binding factory hashes
        char[] hashchars = new char[basecount*2];
        for (int i = 0; i < basecount; i++) {
            int hash = ((Integer)m_baseHashes.get(i)).intValue();
            hashchars[i*2] = (char)(hash >> 16);
            hashchars[i*2+1] = (char)hash;
        }
        codegenString(new String(hashchars), mb);
       
        // create array of blobs of base binding namespace translation tables
        mb.appendLoadConstant(basecount + m_closureNamespaceTables.size());
        mb.appendCreateArray("java.lang.String");
        for (int i = 0; i < basecount; i++) {
            int[] table = (int[])m_baseNamespaceTables.get(i);
            if (table != null) {
                mb.appendDUP();
                mb.appendLoadConstant(i);
                mb.appendLoadConstant(buildIntsBlob(table));
                mb.appendAASTORE();
            }
        }
        for (int i = 0; i < m_closureNamespaceTables.size(); i++) {
            int[] table = (int[])m_closureNamespaceTables.get(i);
            mb.appendDUP();
            mb.appendLoadConstant(i+basecount);
            mb.appendLoadConstant(buildIntsBlob(table));
            mb.appendAASTORE();
        }
       
        // call the base class constructor
        mb.appendCallInit(FACTORY_BASE,
            "(Ljava/lang/String;IILjava/lang/String;Ljava/lang/String;" +
            "Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;" +
            "[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;" +
            "[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;" +
            "Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;" +
            "[Ljava/lang/String;)V");
       
        // get class names for types (abstract non-base mappings)
        GrowableStringArray tnames = new GrowableStringArray();
        if (m_isForceClasses) {
            for (int i = 0; i < count; i++) {
                String cname = (String)s_mappedClasses.get(i);
                IMapping map = m_activeContext.getMappingAtLevel(cname);
                if (map != null && map.isAbstract() && !map.isBase()) {
                    String tname = map.getTypeName();
                    if (tname == null) {
                        tname = cname;
                    }
                    tnames.add(tname);
                }
            }
        }
       
        // check if map needed for types
        ClassItem tmap = null;
        if (tnames.size() >= TYPEMAP_MINIMUM_SIZE) {
           
            // create field for map
            tmap = cf.addPrivateField(STRINGINT_MAPTYPE, TYPEMAP_NAME);
           
            // initialize with appropriate size
            mb.appendLoadLocal(0);
            mb.appendCreateNew(STRINGINT_MAPTYPE);
            mb.appendDUP();
            mb.appendLoadConstant(tnames.size());
            mb.appendCallInit(STRINGINT_MAPTYPE, STRINGINTINIT_SIGNATURE);
           
            // add all values to map
            for (int i = 0; i < tnames.size(); i++) {
                int index = s_mappedClasses.find(tnames.get(i));
                if (index >= 0) {
                    mb.appendDUP();
                    mb.appendLoadConstant((String)tnames.get(i));
                    mb.appendLoadConstant(index);
                    mb.appendCallVirtual(STRINGINTADD_METHOD,
                        STRINGINTADD_SIGNATURE);
                    mb.appendPOP();
                }
            }
            mb.appendPutField(tmap);
        }
       
        // finish with return from constructor
        mb.appendReturn();
        mb.codeComplete(false);
        mb.addMethod();
       
        // add the compiler version access method
        mb = new ExceptionMethodBuilder(GETVERSION_METHODNAME,
            Type.INT, new Type[0], cf, Constants.ACC_PUBLIC);
        mb.appendLoadConstant(IBindingFactory.CURRENT_VERSION_NUMBER);
        mb.appendReturn("int");
        mb.codeComplete(false);
        mb.addMethod();
       
        // add the compiler distribution access method
        mb = new ExceptionMethodBuilder(GETDISTRIB_METHODNAME,
            Type.STRING, new Type[0], cf, Constants.ACC_PUBLIC);
        mb.appendLoadConstant(CURRENT_VERSION_NAME);
        mb.appendReturn(Type.STRING);
        mb.codeComplete(false);
        mb.addMethod();
       
        // add the type mapping index lookup method
        mb = new ExceptionMethodBuilder(GETTYPEINDEX_METHODNAME,
            Type.INT, new Type[] { Type.STRING }, cf, Constants.ACC_PUBLIC);
        if (tnames.size() > 0) {
            if (tmap == null) {
               
                // generate in-line compares for mapping
                for (int i = 0; i < tnames.size(); i++) {
                    int index = s_mappedClasses.find(tnames.get(i));
                    if (index >= 0) {
                        mb.appendLoadLocal(1);
                        mb.appendLoadConstant((String)tnames.get(i));
                        mb.appendCallVirtual("java.lang.String.equals",
                            "(Ljava/lang/Object;)Z");
                        BranchWrapper onfail = mb.appendIFEQ(this);
                        mb.appendLoadConstant(index);
                        mb.appendReturn(Type.INT);
                        mb.targetNext(onfail);
                    }
                }
                mb.appendLoadConstant(-1);
               
            } else {
               
                // use map constructed in initializer
                mb.appendLoadLocal(0);
                mb.appendGetField(tmap);
                mb.appendLoadLocal(1);
                mb.appendCallVirtual(STRINGINTGET_METHOD,
                    STRINGINTGET_SIGNATURE);
               
            }
        } else {
           
            // no types to handle, just always return failure
            mb.appendLoadConstant(-1);
           
        }
        mb.appendReturn(Type.INT);
        mb.codeComplete(false);
        mb.addMethod();
       
        // finish with instance creation method
        mb = new ExceptionMethodBuilder(GETINST_METHODNAME,
            ClassItem.typeFromName(FACTORY_INTERFACE), new Type[0], cf,
            (short)(Constants.ACC_PUBLIC | Constants.ACC_STATIC));
        mb.appendGetStatic(inst);
        BranchWrapper ifdone = mb.appendIFNONNULL(this);
        mb.appendCreateNew(cf.getName());
        mb.appendDUP();
        mb.appendCallInit(cf.getName(), "()V");
        mb.appendPutStatic(inst);
        mb.targetNext(ifdone);
        mb.appendGetStatic(inst);
        mb.appendReturn(FACTORY_INTERFACE);
        mb.codeComplete(false);
        mb.addMethod();
       
        // add factory class to generated registry
        cf.codeComplete();
        MungedClass.addModifiedClass(cf);
        m_factoryClass = cf;
       
        // record the binding factory in each top-level mapped class
        ArrayList maps = m_activeContext.getMappings();
View Full Code Here

Examples of org.jibx.binding.classes.ClassFile

     */
  protected void addIMarshallableMethod() throws JiBXException {
     
      // set up for constructing actual marshal method
        BoundClass clas = getBoundClass();
      ClassFile cf = clas.getMungedFile();
      ContextMethodBuilder mb = new ContextMethodBuilder
          (MARSHALLABLE_METHODNAME, MARSHALLABLE_SIGNATURE, cf,
          Constants.ACC_PUBLIC, 0, clas.getClassFile().getName(),
          1, MARSHALLER_INTERFACE);
     
      // create call to marshalling context method with class name
      mb.loadContext();
      mb.appendLoadConstant(cf.getName());
      mb.appendCallInterface(GETMARSHALLER_METHOD, GETMARSHALLER_SIGNATURE);
     
      // call the returned marshaller with this object and the marshalling
      //  context as parameters
      mb.loadObject();
      mb.loadContext();
      mb.appendCallInterface(MARSHALLERMARSHAL_METHOD,
          MARSHALLERMARSHAL_SIGNATURE);
      mb.appendReturn();
     
      // add method to class
      clas.getUniqueNamed(mb);
     
      // generate and add get mapping name method
      ExceptionMethodBuilder xb = new ExceptionMethodBuilder
            (GETNAME_METHODNAME, GETNAME_SIGNATURE, cf, Constants.ACC_PUBLIC);
      xb.appendLoadConstant(cf.getName());
      xb.appendReturn("java.lang.String");
      clas.getUniqueNamed(xb);
     
      // add the interface to class
      clas.getClassFile().addInterface(IMARSHALLABLE_INTERFACE);
View Full Code Here

Examples of org.jibx.binding.classes.ClassFile

     */
  protected void addIUnmarshallableMethod() throws JiBXException {
     
      // set up for constructing new method
        BoundClass clas = getBoundClass();
      ClassFile cf = clas.getMungedFile();
      ContextMethodBuilder mb = new ContextMethodBuilder
          (UNMARSHALLABLE_METHODNAME, UNMARSHALLABLE_SIGNATURE, cf,
          Constants.ACC_PUBLIC, 0, clas.getClassFile().getName(),
          1, UNMARSHALLER_INTERFACE);
     
      // create call to unmarshalling context method with class name
      mb.loadContext();
        mb.appendLoadConstant(cf.getName());
      mb.appendCallInterface(GETUNMARSHALLER_METHOD,
          GETUNMARSHALLER_SIGNATURE);
     
      // call the returned unmarshaller with this object and the unmarshalling
      //  context as parameters
      mb.loadObject();
      mb.loadContext();
      mb.appendCallInterface(UNMARSHALLERUNMARSHAL_METHOD,
          UNMARSHALLERUNMARSHAL_SIGNATURE);
      mb.appendReturn();
     
      // add the method to class
      clas.getUniqueNamed(mb);
       
        // generate and add get mapping name method
        ExceptionMethodBuilder xb = new ExceptionMethodBuilder
            (GETNAME_METHODNAME, GETNAME_SIGNATURE, cf, Constants.ACC_PUBLIC);
        xb.appendLoadConstant(cf.getName());
        xb.appendReturn("java.lang.String");
        clas.getUniqueNamed(xb);
       
        // add the interface to class
      clas.getClassFile().addInterface(IUNMARSHALLABLE_INTERFACE);
View Full Code Here

Examples of org.jibx.binding.classes.ClassFile

       
        // verify compatible use of structure
        String type = (m_property == null) ?
            m_contextObject.getBoundClass().getClassName() :
            m_property.getTypeName();
        ClassFile cf = ClassCache.requireClassFile(type);
        String itype = impl.getType();
        if (!cf.isSuperclass(itype)) {
            throw new JiBXException("Reference to structure " + m_label +
                " has object of type " + type + " rather than required " +
                itype);
        }
       
View Full Code Here

Examples of org.jibx.binding.classes.ClassFile

       
        // initialize the basics
        m_container = contain;
        BoundClass ctxc = (objc == null) ? null : objc.getBoundClass();
        m_class = BoundClass.getInstance(type, ctxc);
        ClassFile cf = m_class.getClassFile();
        if (ctype == null) {
            m_createClass = cf;
        } else {
            m_createClass = ClassCache.requireClassFile(ctype);
        }
       
        // check instance creation for unmarshalling
        if (fact == null) {
            m_factoryMethod = null;
        } else {
           
            // look up supplied static factory method
            int split = fact.lastIndexOf('.');
            if (split >= 0) {
               
                // verify the method is defined
                String cname = fact.substring(0, split);
                String mname = fact.substring(split+1);
                ClassFile mcf = ClassCache.requireClassFile(cname);
                m_factoryMethod = mcf.getMethod(mname,
                    FACTORY_HOOK_SIGNATURES);
                if (m_factoryMethod == null) {
                    throw new JiBXException("Factory method " + fact +
                        " not found");
                } else {
View Full Code Here

Examples of org.jibx.binding.classes.ClassFile

            m_factoryMethod != null || m_preSetMethod != null)) {
           
            // set up for constructing new method
            String name = m_container.getBindingRoot().getPrefix() +
                NEWINSTANCE_SUFFIX;
            ClassFile cf = m_class.getMungedFile();
            Type type = m_class.getClassFile().getType();
            ContextMethodBuilder mb = new ContextMethodBuilder(name, type,
                new Type[] {type, UNMARSHALCONTEXT_TYPE}, cf,
                Constants.ACC_PUBLIC|Constants.ACC_STATIC, 0,
                m_class.getClassName(), 1, UNMARSHALLING_CONTEXT);
View Full Code Here

Examples of org.jibx.binding.classes.ClassFile

     * convenience method generates the member variables and method used to
     * support setting the source location, the methods used to access the
     * information, and also adds the appropriate interfaces to the class.
     */
    private void genTrackSourceCode() {
        ClassFile cf = m_class.getMungedFile();
        if (m_class.isDirectAccess() && !cf.isAbstract() &&
            cf.addInterface(SOURCE_TRACKING_INTERFACE)) {
       
            // add position tracking fields to class
            ClassItem srcname = cf.addPrivateField("java.lang.String;",
                SOURCEDOCUMENT_FIELDNAME);
            ClassItem srcline = cf.addPrivateField("int", SOURCELINE_FIELDNAME);
            ClassItem srccol = cf.addPrivateField("int",
                SOURCECOLUMN_FIELDNAME);
       
            // add method for setting the source information
            MethodBuilder mb = new ExceptionMethodBuilder(SETSOURCE_METHODNAME,
                Type.VOID, SETSOURCE_ARGS, cf, Constants.ACC_PUBLIC);
View Full Code Here

Examples of org.jibx.binding.classes.ClassFile

        boolean isthis, boolean opt, String fname, String test, String flag,
        String get, String set) throws JiBXException {
        m_objContext = obj;
        m_isThis = isthis;
        m_isOptional = opt;
        ClassFile cf = m_objContext.getBoundClass().getClassFile();
        m_isImplicit = false;
        String dtype = null;
        String gtype = null;
        String stype = null;
        if (isthis) {
            if (type == null) {
                dtype = gtype = stype = cf.getName();
            } else {
                dtype = gtype = stype = type;
            }
        }
        if (fname == null) {
            m_fieldItem = null;
        } else {
            m_fieldItem = cf.getField(fname);
            dtype = gtype = stype = m_fieldItem.getTypeName();
        }
        if (test == null) {
            m_testMethod = null;
        } else {
            m_testMethod = cf.getMethod(test, TEST_METHOD_SIGNATURES);
            if (m_testMethod == null) {
                throw new JiBXException("test-method " + test +
                    " not found in class " + cf.getName());
            }
        }
        if (get == null) {
            m_getMethod = null;
        } else {
            m_getMethod = cf.getMethod(get, GET_METHOD_SIGNATURES);
            if (m_getMethod == null) {
                throw new JiBXException("get-method " + get +
                    " not found in class " + cf.getName());
            } else {
                gtype = m_getMethod.getTypeName();
                if (dtype == null) {
                    dtype = gtype;
                }
            }
        }
        if (set == null) {
            m_setMethod = null;
        } else {
           
            // need to handle overloads, so generate possible signatures
            ArrayList sigs = new ArrayList();
            if (m_getMethod != null) {
                String psig = ClassUtils.getSignature(gtype);
                sigs.add("(" + psig +
                    "Lorg/jibx/runtime/IUnmarshallingContext;" + ")V");
                sigs.add("(" + psig + ")V");
            }
            if (type != null) {
                String psig = ClassUtils.getSignature(type);
                sigs.add("(" + psig +
                    "Lorg/jibx/runtime/IUnmarshallingContext;" + ")V");
                sigs.add("(" + psig + ")V");
            }
            if (m_fieldItem != null) {
                String psig = m_fieldItem.getSignature();
                sigs.add("(" + psig +
                    "Lorg/jibx/runtime/IUnmarshallingContext;" + ")V");
                sigs.add("(" + psig + ")V");
            }
            sigs.add
                ("(Ljava/lang/Object;Lorg/jibx/runtime/IUnmarshallingContext;)V");
            sigs.add("(Ljava/lang/Object;)V");
           
            // set method needs verification of argument and return type
            ClassItem setmeth = cf.getMethod(set,
                (String[])sigs.toArray(new String[0]));
            if (setmeth == null) {
               
                // nothing known about signature, try anything by name
                setmeth = cf.getMethod(set, "");
                if (setmeth != null) {
                    if (!setmeth.getTypeName().equals("void") ||
                        setmeth.getArgumentCount() > 2) {
                        setmeth = null;
                    } else if (setmeth.getArgumentCount() == 2) {
                        String xtype = setmeth.getArgumentType(1);
                        if (!"org.jibx.runtime.IUnmarshallingContext".equals(xtype)) {
                            setmeth = null;
                        }
                    }
                }
            }
           
            // check if method found
            m_setMethod = setmeth;
            if (m_setMethod == null) {
                throw new JiBXException("set-method " + set +
                    " not found in class " + cf.getName());
            } else {
                stype = m_setMethod.getArgumentType(0);
                if (dtype == null) {
                    dtype = stype;
                }
            }
        }
        if (flag == null) {
            m_flagMethod = null;
        } else {
            m_flagMethod = cf.getMethod(flag, FLAG_METHOD_SIGNATURES);
            if (m_flagMethod == null) {
                throw new JiBXException("flag-method " + flag +
                    " not found in class " + cf.getName());
            } else if (stype == null) {
                stype = "java.lang.String";
                if (dtype == null) {
                    dtype = stype;
                }
View Full Code Here

Examples of org.jibx.binding.classes.ClassFile

    public PropertyDefinition(IContextObj obj, boolean opt) {
        m_objContext = obj;
        m_isThis = true;
        m_isImplicit = false;
        m_isOptional = opt;
        ClassFile cf = m_objContext.getBoundClass().getClassFile();
        m_fieldItem = m_testMethod = m_flagMethod = m_getMethod = m_setMethod = null;
        m_typeName = m_getValueType = m_setValueType = cf.getName();
    }
View Full Code Here

Examples of org.jibx.binding.classes.ClassFile

     * @throws JiBXException if configuration error
     */
    public void genFlag(MethodBuilder mb) throws JiBXException {
       
        // first check direct access to property from method class
        ClassFile from = mb.getClassFile();
        ClassItem access = m_flagMethod;
        if (!from.isAccessible(access)) {
            access = m_objContext.getBoundClass().
                getStoreMethod(access, mb.getClassFile());
        }
       
        // generated instruction calls the "flag" method
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.