Skip to content

Commit

Permalink
GH-392 Document prototype design classes
Browse files Browse the repository at this point in the history
  • Loading branch information
dzikoysk committed Nov 1, 2019
1 parent ea4b69c commit cad6c80
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@

import org.panda_lang.framework.design.architecture.expression.Expression;

/**
* Container for arguments adjusted to the property signature
*
* @param <T> generic type of property
*/
public interface Adjustment<T extends ExecutableProperty> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

import java.util.Optional;

/**
* Container for constructors
*/
public interface Constructors extends Properties<PrototypeConstructor> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

import java.util.Optional;

/**
* Container for fields
*/
public interface Fields extends Properties<PrototypeField> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

import java.util.Optional;

/**
* Container for methods
*/
public interface Methods extends Properties<PrototypeMethod> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
import java.util.List;
import java.util.function.Supplier;

/**
* Represents container of executable properties
*
* @param <T> generic type of represented properties
*/
public interface Properties<T extends ExecutableProperty> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.panda_lang.framework.design.interpreter.source.SourceLocation;

/**
* Element of property
* Element of prototype
*/
public interface Property {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

package org.panda_lang.framework.design.architecture.prototype;

/**
* Represents constructor property
*/
public interface PrototypeConstructor extends ExecutableProperty {

}
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

package org.panda_lang.framework.design.architecture.prototype;

/**
* Represents method property
*/
public interface PrototypeMethod extends ExecutableProperty {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

package org.panda_lang.framework.design.architecture.prototype;

/**
* Represent objects that can be reduced to the reference
*/
public interface Referencable {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit cad6c80

Please sign in to comment.