Examples of Property


Examples of org.jgroups.demo.tankwar.jmx.annotations.Property

        for(Class<?> clazz=getObject().getClass();clazz != null; clazz=clazz.getSuperclass()) {

            Field[] fields=clazz.getDeclaredFields();
            for(Field field:fields) {
                ManagedAttribute attr=field.getAnnotation(ManagedAttribute.class);
                Property prop=field.getAnnotation(Property.class);
                boolean expose_prop=prop != null && prop.exposeAsManagedAttribute();
                boolean expose=attr != null || expose_prop;

                if(expose) {
                    String fieldName = attributeNameToMethodName(field.getName());
                    String descr=attr != null? attr.description() : prop.description();
                    boolean writable=attr != null? attr.writable() : prop.writable();

                    MBeanAttributeInfo info=new MBeanAttributeInfo(fieldName,
                                                                   field.getType().getCanonicalName(),
                                                                   descr,
                                                                   true,
View Full Code Here

Examples of org.jnetpcap.packet.annotate.Field.Property

   *
   * @param method
   *          the new function
   */
  public void setFunction(AnnotatedFieldMethod method) {
    final Property function = method.getFunction();

    if (map.containsKey(function)) {
      throw new HeaderDefinitionError(method.getMethod().getDeclaringClass(),
          "duplicate " + function + " method declarations for field "
              + parent.getName());
View Full Code Here

Examples of org.jnode.configure.PropertySet.Property

        String valueIsNotStr = element.getAttribute(VALUE_IS_NOT, null);

        Value valueIs = null;
        Value valueIsNot = null;
        if (guardPropName != null) {
            Property guardProp = script.getProperty(guardPropName);
            if (guardProp == null) {
                error("A guard property '" + guardPropName + "' not declared", element);
            }
            if (valueIsStr != null && valueIsNotStr != null) {
                error("The '" + VALUE_IS + "' and '" + VALUE_IS_NOT +
                        "' attributes cannot be used together", element);
            }
            PropertyType type = guardProp.getType();
            if (valueIsStr != null) {
                valueIs = type.fromValue(valueIsStr);
                if (valueIs == null) {
                    error("The string '" + valueIsStr + "' is not a valid " + type.getTypeName() +
                            " instance", element);
View Full Code Here

Examples of org.joda.time.DateTime.Property

        assertEquals(14, dt.getCenturyOfEra())// TODO confirm
        assertEquals(64, dt.getYearOfCentury());
        assertEquals(1364, dt.getYearOfEra());
       
        assertEquals(1364, dt.getYear());
        Property fld = dt.year();
        assertEquals(false, fld.isLeap());
        assertEquals(0, fld.getLeapAmount());
        assertEquals(DurationFieldType.days(), fld.getLeapDurationField().getType());
        assertEquals(new DateTime(1365, 12, 6, 0, 0, 0, 0, ISLAMIC_UTC), fld.addToCopy(1));
       
        assertEquals(12, dt.getMonthOfYear());
        fld = dt.monthOfYear();
        assertEquals(false, fld.isLeap());
        assertEquals(0, fld.getLeapAmount());
        assertEquals(DurationFieldType.days(), fld.getLeapDurationField().getType());
        assertEquals(1, fld.getMinimumValue());
        assertEquals(1, fld.getMinimumValueOverall());
        assertEquals(12, fld.getMaximumValue());
        assertEquals(12, fld.getMaximumValueOverall());
        assertEquals(new DateTime(1365, 1, 6, 0, 0, 0, 0, ISLAMIC_UTC), fld.addToCopy(1));
        assertEquals(new DateTime(1364, 1, 6, 0, 0, 0, 0, ISLAMIC_UTC), fld.addWrapFieldToCopy(1));
       
        assertEquals(6, dt.getDayOfMonth());
        fld = dt.dayOfMonth();
        assertEquals(false, fld.isLeap());
        assertEquals(0, fld.getLeapAmount());
        assertEquals(null, fld.getLeapDurationField());
        assertEquals(1, fld.getMinimumValue());
        assertEquals(1, fld.getMinimumValueOverall());
        assertEquals(29, fld.getMaximumValue());
        assertEquals(30, fld.getMaximumValueOverall());
        assertEquals(new DateTime(1364, 12, 7, 0, 0, 0, 0, ISLAMIC_UTC), fld.addToCopy(1));
       
        assertEquals(DateTimeConstants.MONDAY, dt.getDayOfWeek());
        fld = dt.dayOfWeek();
        assertEquals(false, fld.isLeap());
        assertEquals(0, fld.getLeapAmount());
        assertEquals(null, fld.getLeapDurationField());
        assertEquals(1, fld.getMinimumValue());
        assertEquals(1, fld.getMinimumValueOverall());
        assertEquals(7, fld.getMaximumValue());
        assertEquals(7, fld.getMaximumValueOverall());
        assertEquals(new DateTime(1364, 12, 7, 0, 0, 0, 0, ISLAMIC_UTC), fld.addToCopy(1));
       
        assertEquals(6 * 30 + 5 * 29 + 6, dt.getDayOfYear());
        fld = dt.dayOfYear();
        assertEquals(false, fld.isLeap());
        assertEquals(0, fld.getLeapAmount());
        assertEquals(null, fld.getLeapDurationField());
        assertEquals(1, fld.getMinimumValue());
        assertEquals(1, fld.getMinimumValueOverall());
        assertEquals(354, fld.getMaximumValue());
        assertEquals(355, fld.getMaximumValueOverall());
        assertEquals(new DateTime(1364, 12, 7, 0, 0, 0, 0, ISLAMIC_UTC), fld.addToCopy(1));
       
        assertEquals(0, dt.getHourOfDay());
        assertEquals(0, dt.getMinuteOfHour());
        assertEquals(0, dt.getSecondOfMinute());
        assertEquals(0, dt.getMillisOfSecond());
View Full Code Here

Examples of org.joda.time.MutableDateTime.Property

                }
                Object[] array = innerMap.get(iFieldType);
                if (array == null) {
                    validValues = new HashSet<String>(32);
                    MutableDateTime dt = new MutableDateTime(0L, DateTimeZone.UTC);
                    Property property = dt.property(iFieldType);
                    int min = property.getMinimumValueOverall();
                    int max = property.getMaximumValueOverall();
                    if (max - min > 32) {  // protect against invalid fields
                        return ~position;
                    }
                    maxLength = property.getMaximumTextLength(locale);
                    for (int i = min; i <= max; i++) {
                        property.set(i);
                        validValues.add(property.getAsShortText(locale));
                        validValues.add(property.getAsShortText(locale).toLowerCase(locale));
                        validValues.add(property.getAsShortText(locale).toUpperCase(locale));
                        validValues.add(property.getAsText(locale));
                        validValues.add(property.getAsText(locale).toLowerCase(locale));
                        validValues.add(property.getAsText(locale).toUpperCase(locale));
                    }
                    if ("en".equals(locale.getLanguage()) && iFieldType == DateTimeFieldType.era()) {
                        // hack to support for parsing "BCE" and "CE" if the language is English
                        validValues.add("BCE");
                        validValues.add("bce");
View Full Code Here

Examples of org.jtalks.common.model.entity.Property

    public void setUp() {
        initMocks(this);
        imageSizeProperty.setName(PROPERTY_NAME);
        imageSizeProperty.setPropertyDao(propertyDao);
        when(propertyDao.getByName(PROPERTY_NAME))
                .thenReturn(new Property(PROPERTY_NAME, String.valueOf(IMAGE_MAX_SIZE)));
        imageService = new ImageService(
                imageConverter,
                base64Wrapper,
                "org/jtalks/jcommune/service/avatar.gif",
                imageSizeProperty);
View Full Code Here

Examples of org.jvnet.glassfish.comms.clb.admin.Property

            _lb.setDcrFile(lbRdr.getDcrFile());
        } catch (LbReaderException le) {
            // XXX ignore
        }

        Property prop = null;
        PropertyReader[] pRdrs = null;

        try {
            pRdrs = lbRdr.getProperties();
        } catch (LbReaderException le) {
            // should we throw this exception XXX ???
            // or fill in with default values
        }

        if ((pRdrs != null) && (pRdrs.length > 0)) {
            for (int i = 0; i < pRdrs.length; i++) {
                prop = new Property();
                pRdrs[i].accept(new PropertyVisitor(prop));
                _lb.getProperty().add(prop);
            }
        }
View Full Code Here

Examples of org.jvnet.hk2.config.types.Property

            List<String> vsList = StringUtils.parseStringList(vsIDs, " ,");
            if (httpService != null && vsList != null && !vsList.isEmpty()) {
                for (VirtualServer vsBean : httpService.getVirtualServer()) {
                    if (vsList.contains(vsBean.getId())) {
                        Boolean csr = null;
                        Property prop = vsBean.getProperty("contextXmlDefault");
                        if (prop != null) {
                            File contextXml = new File(serverEnvironment.getInstanceRoot(),
                                    prop.getValue());
                            if (contextXml.exists()) {  // vs context.xml
                                ContextXmlParser parser = new ContextXmlParser(contextXml);
                                csr = parser.getClearReferencesStatic();
                            }
                        }
View Full Code Here

Examples of org.mantikhor.llapi.Property

     * Test method for {@link org.mantikhor.logic.CardinalOr#containsProperty(org.mantikhor.llapi.BaseProperty)}.
     */
    public void testContainsProperty()
    {
        CardinalOr cardinalOr = new CardinalOr(3);
        Property prop = PropertyImpl.valueByDefNode(
                new PropertyDefinitionImpl(PropertyCategory.LOGIC, DomainURI.valueByString("http://wijis.wisconsin.gov/names/operators/wijis/gateway/")),
                ResourceNodeImpl.getEmptyInstance(DomainURI.valueByString("http://wijis.wisconsin.gov/names/operators/wijis/gateway/")));
       
        assertFalse(cardinalOr.containsProperty(prop));
    }
View Full Code Here

Examples of org.metawidget.inspector.impl.propertystyle.Property

         {
            return new ValueAndDeclaredType(null, traverseDeclaredType);
         }

         String name = names[loop];
         Property property = getProperties(traverseDeclaredType).get(name);

         if ((property == null) || !property.isReadable())
         {
            return new ValueAndDeclaredType(null, null);
         }

         traverseDeclaredType = property.getType();
      }

      return new ValueAndDeclaredType(null, traverseDeclaredType);
   }
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.