From cad6c80cbbe1407bcb9e10a8b72f421b3727953a Mon Sep 17 00:00:00 2001 From: dzikoysk Date: Fri, 1 Nov 2019 18:40:51 +0100 Subject: [PATCH] GH-392 Document prototype design classes --- .../framework/design/architecture/prototype/Adjustment.java | 5 +++++ .../design/architecture/prototype/Constructors.java | 3 +++ .../framework/design/architecture/prototype/Fields.java | 3 +++ .../framework/design/architecture/prototype/Methods.java | 3 +++ .../framework/design/architecture/prototype/Properties.java | 5 +++++ .../framework/design/architecture/prototype/Property.java | 2 +- .../design/architecture/prototype/PropertyFrame.java | 3 +++ .../design/architecture/prototype/PropertyParameter.java | 3 +++ .../framework/design/architecture/prototype/Prototype.java | 2 +- .../design/architecture/prototype/PrototypeConstructor.java | 3 +++ .../design/architecture/prototype/PrototypeField.java | 3 +++ .../design/architecture/prototype/PrototypeMethod.java | 3 +++ .../design/architecture/prototype/Referencable.java | 3 +++ .../architecture/prototype/ReferenceFetchException.java | 3 +++ 14 files changed, 42 insertions(+), 2 deletions(-) diff --git a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Adjustment.java b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Adjustment.java index 75e3e8e45..c8a2137b1 100644 --- a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Adjustment.java +++ b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Adjustment.java @@ -18,6 +18,11 @@ import org.panda_lang.framework.design.architecture.expression.Expression; +/** + * Container for arguments adjusted to the property signature + * + * @param generic type of property + */ public interface Adjustment { /** diff --git a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Constructors.java b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Constructors.java index e1b12e3bf..3d4fbfd53 100644 --- a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Constructors.java +++ b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Constructors.java @@ -20,6 +20,9 @@ import java.util.Optional; +/** + * Container for constructors + */ public interface Constructors extends Properties { /** diff --git a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Fields.java b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Fields.java index fc85a5fca..ccadb0056 100644 --- a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Fields.java +++ b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Fields.java @@ -18,6 +18,9 @@ import java.util.Optional; +/** + * Container for fields + */ public interface Fields extends Properties { /** diff --git a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Methods.java b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Methods.java index 000deff44..3ef5bb78f 100644 --- a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Methods.java +++ b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Methods.java @@ -20,6 +20,9 @@ import java.util.Optional; +/** + * Container for methods + */ public interface Methods extends Properties { /** diff --git a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Properties.java b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Properties.java index 2579a370a..d19d4dd18 100644 --- a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Properties.java +++ b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Properties.java @@ -19,6 +19,11 @@ import java.util.List; import java.util.function.Supplier; +/** + * Represents container of executable properties + * + * @param generic type of represented properties + */ public interface Properties { /** diff --git a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Property.java b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Property.java index e44e56c0f..4fa3ad12a 100644 --- a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Property.java +++ b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Property.java @@ -20,7 +20,7 @@ import org.panda_lang.framework.design.interpreter.source.SourceLocation; /** - * Element of property + * Element of prototype */ public interface Property { diff --git a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PropertyFrame.java b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PropertyFrame.java index e522bc82d..8b875752e 100644 --- a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PropertyFrame.java +++ b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PropertyFrame.java @@ -18,6 +18,9 @@ import org.panda_lang.framework.design.architecture.dynamic.Frame; +/** + * Represents frames within the prototype frame (e.g. methods) + */ public interface PropertyFrame extends Frame { /** diff --git a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PropertyParameter.java b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PropertyParameter.java index bb46fe2ec..3b4304e15 100644 --- a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PropertyParameter.java +++ b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PropertyParameter.java @@ -18,6 +18,9 @@ import org.panda_lang.framework.design.architecture.statement.Variable; +/** + * Represents variable defined in the property signature - commonly called parameter + */ public interface PropertyParameter extends Variable { /** diff --git a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Prototype.java b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Prototype.java index f00330fa3..b351b00c4 100644 --- a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Prototype.java +++ b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Prototype.java @@ -23,7 +23,7 @@ import java.util.Optional; /** - * Basic set of static data about a type + * Extensible owner of properties */ public interface Prototype extends Property, Referencable { diff --git a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PrototypeConstructor.java b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PrototypeConstructor.java index 4ab0c3e7b..f24a1592b 100644 --- a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PrototypeConstructor.java +++ b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PrototypeConstructor.java @@ -16,6 +16,9 @@ package org.panda_lang.framework.design.architecture.prototype; +/** + * Represents constructor property + */ public interface PrototypeConstructor extends ExecutableProperty { } diff --git a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PrototypeField.java b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PrototypeField.java index ca1df2def..1281eabf7 100644 --- a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PrototypeField.java +++ b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PrototypeField.java @@ -19,6 +19,9 @@ import org.panda_lang.framework.design.architecture.statement.Variable; import org.panda_lang.framework.design.architecture.expression.Expression; +/** + * Represents field property + */ public interface PrototypeField extends ExecutableProperty, Variable { /** diff --git a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PrototypeMethod.java b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PrototypeMethod.java index 093f8d666..27506df61 100644 --- a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PrototypeMethod.java +++ b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/PrototypeMethod.java @@ -16,6 +16,9 @@ package org.panda_lang.framework.design.architecture.prototype; +/** + * Represents method property + */ public interface PrototypeMethod extends ExecutableProperty { /** diff --git a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Referencable.java b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Referencable.java index 7edc8d205..e11c9bcbe 100644 --- a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Referencable.java +++ b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/Referencable.java @@ -16,6 +16,9 @@ package org.panda_lang.framework.design.architecture.prototype; +/** + * Represent objects that can be reduced to the reference + */ public interface Referencable { /** diff --git a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/ReferenceFetchException.java b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/ReferenceFetchException.java index 191adeb64..878ae9c01 100644 --- a/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/ReferenceFetchException.java +++ b/panda-framework/src/main/java/org/panda_lang/framework/design/architecture/prototype/ReferenceFetchException.java @@ -18,6 +18,9 @@ import org.panda_lang.framework.language.runtime.PandaRuntimeException; +/** + * Represents exceptions that may happen during the process of fetching a prototype + */ public final class ReferenceFetchException extends PandaRuntimeException { public ReferenceFetchException(String message, Throwable cause) {