Class BuckStarlarkStructObject

  • All Implemented Interfaces:,,
    Direct Known Subclasses:

    public abstract class BuckStarlarkStructObject
    extends Object
    Marks a Java object as accessible by Skylark as a struct-like object called ClassObject. This also marks it as a SkylarkValue.

    A struct like object is an object containing fields accessible via the dot syntax, like obj.field.

    We currently do not support method calls.

    • Constructor Detail

      • BuckStarlarkStructObject

        public BuckStarlarkStructObject()
    • Method Detail

      • getValue

        public Object getValue​(String name)
        Specified by:
        getValue in interface
      • getMethods

        protected<String,​Method> getMethods()
      • getDeclaredClass

        protected abstract Class<?> getDeclaredClass()
        the class for which all declared methods on it are considered skylark accessible.
      • getFieldNames

        public<String> getFieldNames()
        Specified by:
        getFieldNames in interface
      • getErrorMessageForUnknownField

        public String getErrorMessageForUnknownField​(String field)
        Specified by:
        getErrorMessageForUnknownField in interface
      • repr

        public void repr​( printer)
        Specified by:
        repr in interface