Package javassist

Examples of javassist.CtField$DoubleInitializer


        }
    }

    protected void atFieldPlusPlus(ASTree oprand) throws CompileError
    {
        CtField f = fieldAccess(oprand);
        atFieldRead(f);
        int t = exprType;
        if (t == INT || t == BYTE || t == CHAR || t == SHORT)
            exprType = INT;
    }
View Full Code Here


      }
      if (fieldArray != null)
         return null;
      try
      {
         CtField field = ctClass.getDeclaredField(name);
         if (field == null)
            return null;
         return generateFieldInfo(field);
      }
      catch (NotFoundException e)
View Full Code Here

      seiClass.getClassFile().addAttribute(attribute);
     
      final String siClassName = ServiceInvoker.class.getName() ;
      final CtClass siClass = pool.get(siClassName) ;
      final String siFieldName = "serviceInvoker" ;
      final CtField field = new CtField(siClass, siFieldName, seiClass) ;
      field.setModifiers(Modifier.PRIVATE | Modifier.STATIC | Modifier.FINAL) ;
      seiClass.addField(field, "new " + siClassName + "(\"" + category + "\", \"" + service + "\")") ;
     

      final String constructorStr = "super(" + getParamValue(deployment) + "," + siFieldName + "," +
        getParamValue(epInfo.getRequestLocation()) + "," + getParamValue(epInfo.getResponseLocation()) + ", \"" +
View Full Code Here

        CtClass ctType = convertClass(type);

        try
        {
            CtField field = new CtField(ctType, name, getCtClass());
            field.setModifiers(modifiers);

            getCtClass().addField(field);
        }
        catch (CannotCompileException ex)
        {
View Full Code Here

        return annotations;
    }

    private List<Annotation> findAnnotationsForField(String fieldName)
    {
        CtField field = findDeclaredCtField(fieldName);

        return extractAnnotations(field);
    }
View Full Code Here

    {
        failIfFrozen();

        try
        {
            CtField field = _ctClass.getDeclaredField(fieldName);

            return isInstanceField(field);
        }
        catch (NotFoundException ex)
        {
View Full Code Here

    private CtClass getFieldCtType(String fieldName)
    {
        try
        {
            CtField field = _ctClass.getDeclaredField(fieldName);

            return field.getType();
        }
        catch (NotFoundException ex)
        {
            throw new RuntimeException(ex);
        }
View Full Code Here

        try
        {
            CtClass ctType = convertNameToCtType(type);

            CtField field = new CtField(ctType, fieldName, _ctClass);
            field.setModifiers(modifiers);

            _ctClass.addField(field);
        }
        catch (NotFoundException ex)
        {
View Full Code Here

        {
            for (String fieldName : _removedFieldNames)
            {
                try
                {
                    CtField field = _ctClass.getDeclaredField(fieldName);
                    _ctClass.removeField(field);
                }
                catch (NotFoundException ex)
                {
                    throw new RuntimeException(ex);
View Full Code Here

    public static void init() {
        if (!initialized) {
            try {
                ClassLoader cl = RhqAgentPluginContainer.class.getClassLoader();
                CtClass pcClass = ClassPool.getDefault().get("org.rhq.core.pc.PluginContainer");
                CtField instancesField = CtField.make("private static java.util.Map INSTANCES = new java.util.HashMap();", pcClass);
                pcClass.addField(instancesField);
               
                CtField currentInstanceField = CtField.make("private static String CURRENT_INSTANCE_NAME;", pcClass);
                pcClass.addField(currentInstanceField);
               
                CtMethod getInstance = pcClass.getMethod("getInstance", "()Lorg/rhq/core/pc/PluginContainer;");
                getInstance.setBody("return (org.rhq.core.pc.PluginContainer) INSTANCES.get(CURRENT_INSTANCE_NAME);");
               
View Full Code Here

TOP

Related Classes of javassist.CtField$DoubleInitializer

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.