Class JavaId

    • Field Detail

      • type

        protected JavaId.Type type
        Programming language of the construct.
    • Constructor Detail

    • Method Detail

      • getAnnotations

        public Set<String> getAnnotations()

        Getter for the field annotations.

        Returns:
        a Set object.
      • addAnnotation

        public void addAnnotation​(String _a)

        addAnnotation.

        Parameters:
        _a - a String object.
      • hasAnnotation

        public boolean hasAnnotation​(String _a)

        hasAnnotation.

        Parameters:
        _a - a String object.
        Returns:
        a boolean.
      • getJavaPackageId

        public abstract JavaPackageId getJavaPackageId()
        Returns the Java package in the context of which the construct is defined.
        Returns:
        a JavaPackageId object.
      • getSharedType

        public org.eclipse.steady.shared.enums.ConstructType getSharedType()

        getSharedType.

        Specified by:
        getSharedType in class ConstructId
        Returns:
        a ConstructType object.
      • toGSON

        public com.google.gson.JsonObject toGSON()
        Specified by:
        toGSON in class ConstructId
      • parameterTypesToString

        protected static String parameterTypesToString​(List<String> _p)

        parameterTypesToString.

        Parameters:
        _p - a List object.
        Returns:
        Comma-separated parameter types
      • parameterTypesToString

        protected static String parameterTypesToString​(List<String> _p,
                                                       boolean _rem_qualification)

        parameterTypesToString.

        Parameters:
        _p - a List object.
        _rem_qualification - a boolean.
        Returns:
        Comma-separated parameter types
      • toSharedType

        public static org.eclipse.steady.shared.enums.ConstructType toSharedType​(JavaId.Type _core_type)
        Transforms an object with a given core type (defined in vulas-core) into an object having the corresponding shared type (defined in vulas-share).
        Parameters:
        _core_type - a JavaId.Type object.
        Returns:
        a ConstructType object.
      • toCoreType

        public static ConstructId toCoreType​(org.eclipse.steady.shared.json.model.ConstructId _cid)
        Transforms an object with a given shared type (defined in vulas-share) into an object having the corresponding core type (defined in vulas-core).
        Parameters:
        _cid - a ConstructId object.
        Returns:
        a ConstructId object.
      • toCoreType

        public static Set<ConstructId> toCoreType​(Collection<org.eclipse.steady.shared.json.model.ConstructId> _cids)
        Transforms a collection of objects with a given shared type (defined in vulas-share) into a HashSet of objects having the corresponding core type (defined in vulas-core).
        Parameters:
        _cids - a Collection object.
        Returns:
        a Set object.
      • parseEnumQName

        public static JavaEnumId parseEnumQName​(@NotNull
                                                String _s)

        parseEnumQName.

        Parameters:
        _s - a String object.
        Returns:
        a JavaEnumId object.
      • removePackageContext

        public static String removePackageContext​(String _qname)
        Removes package information (if any) from a fully qualified name, and returns the resulting class (or interface) name.
        Parameters:
        _qname - a String object.
        Returns:
        a String object.
      • filter

        public static Set<ConstructId> filter​(Set<ConstructId> _set,
                                              String[] _filter)
        Returns all JavaIds whose qualified name starts with any of the given strings.
        Parameters:
        _set - a Set object.
        _filter - an array of String objects.
        Returns:
        a Set object.
      • getCompilationUnit

        public JavaId getCompilationUnit()
        Returns the JavaId corresponding to the compilation unit of the construct. If the construct is an interface, class or enum, the object is returned as is. If the construct is a method, constructor or static initializer, its definition context will be returned (hence, an interface, class or enum). If the construct is a package, null will be returned.
        Returns:
        a JavaId object.
      • getCompilationUnit

        public static JavaId getCompilationUnit​(JavaId _jid)

        getCompilationUnit.

        Parameters:
        _jid - a JavaId object
        Returns:
        a JavaId object