Package java.lang.reflect

Examples of java.lang.reflect.AccessibleObject


        Set<String> columnNames = columnNameToFieldMap.keySet();

        for (String columnName : columnNames)
        {
            AccessibleObject accessibleObj = columnNameToFieldMap.get(columnName);

            if (accessibleObj == null)
                continue;

            try
View Full Code Here


                           Conventions conventions) {

        Type type = Type.TEXT;
        Object contentValue = null;
        ObjectContext valueContext = null;
        AccessibleObject accessor = objectContext.getAccessor(Value.class, conventions);
        if (accessor != null && !(source instanceof Element)) {
            contentValue = eval(accessor, source);
            valueContext = new ObjectContext(contentValue, source, accessor);
            Text _text = valueContext.getAnnotation(Text.class);
            type = _text != null ? _text.type() : type;
View Full Code Here

        StreamWriter sw = context.getStreamWriter();
        Category _category = objectContext.getAnnotation(Category.class);

        String scheme = null;
        AccessibleObject accessor = objectContext.getAccessor(Scheme.class, conventions);
        if (accessor != null) {
            Object value = eval(accessor, source);
            if (value != null)
                scheme = toString(value);
        }
View Full Code Here

                           Conventions conventions) {

        Type type = Type.TEXT;
        Object contentValue = null;
        ObjectContext valueContext = null;
        AccessibleObject accessor = objectContext.getAccessor(Value.class, conventions);
        if (accessor != null && !(source instanceof Element)) {
            contentValue = eval(accessor, source);
            valueContext = new ObjectContext(contentValue, source, accessor);
            Content _content = valueContext.getAnnotation(Content.class);
            type = _content != null ? _content.type() : type;
        } else {
            Content _content = objectContext.getAnnotation(Content.class);
            type = _content != null ? _content.type() : type;
            contentValue = source;
            valueContext = objectContext;
        }

        StreamWriter sw = context.getStreamWriter();
        sw.startContent(type);
        writeAttributes(source, objectContext, context, conventions);

        if (type == Type.MEDIA || type == Type.XML) {
            String mediatype = null;
            AccessibleObject mtaccessor = valueContext.getAccessor(MediaType.class, conventions);
            if (mtaccessor != null) {
                Object mtvalue = eval(mtaccessor, contentValue);
                mediatype = mtvalue != null ? toString(mtvalue) : null;
            }
            if (mediatype == null) {
View Full Code Here

        setLastModified(getObjectLastModified());
    }

    private Date getObjectLastModified() {
        Date date = null;
        AccessibleObject accessor = objectContext.getAccessor(LastModified.class, conventions);
        if (accessor != null) {
            Object value = BaseSerializer.eval(accessor, object);
            date = getDate(value);
        }
        return date;
View Full Code Here

        return date;
    }

    private String getObjectEntityTag() {
        String etag = null;
        AccessibleObject accessor = objectContext.getAccessor(EntityTag.class, conventions);
        if (accessor != null) {
            Object value = BaseSerializer.eval(accessor, object);
            etag = value != null ? BaseSerializer.toString(value) : null;
        }
        return etag;
View Full Code Here

        return etag;
    }

    private String getObjectContentType() {
        String ctype = null;
        AccessibleObject accessor = objectContext.getAccessor(MediaType.class, conventions);
        if (accessor != null) {
            Object value = BaseSerializer.eval(accessor, object);
            ctype = value != null ? BaseSerializer.toString(value) : null;
        }
        if (ctype == null) {
View Full Code Here

    protected void writeTextValue(Object source,
                                  ObjectContext objectContext,
                                  SerializationContext context,
                                  Conventions conventions) {
        AccessibleObject accessor = objectContext.getAccessor(Value.class, conventions);
        Object value = null;
        if (accessor != null) {
            value = eval(accessor, source);
        }
        context.getStreamWriter().writeElementText(value != null ? toString(value) : toString(source));
View Full Code Here

                                   Serializer serializer,
                                   Object source,
                                   ObjectContext objectContext,
                                   SerializationContext context,
                                   Conventions conventions) {
        AccessibleObject accessor = objectContext.getAccessor(annotation, conventions);
        if (accessor != null) {
            Object value = eval(accessor, source);
            ObjectContext valueContext = new ObjectContext(value, source, accessor);
            serializer.serialize(value, valueContext, context);
            return true;
View Full Code Here

                               ObjectContext objectContext,
                               SerializationContext context,
                               Conventions conventions) {
        StreamWriter sw = context.getStreamWriter();
        String lang = null;
        AccessibleObject accessor = objectContext.getAccessor(Language.class, conventions);
        if (accessor != null) {
            Object value = eval(accessor, source);
            if (value != null) {
                if (value instanceof Lang || value instanceof org.apache.abdera.i18n.lang.Lang) {
                    lang = value.toString();
View Full Code Here

TOP

Related Classes of java.lang.reflect.AccessibleObject

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.