Skip to content

Attributes#1064

Closed
kashike wants to merge 1 commit intoSpongePowered:bleedingfrom
kashike:feature/attributes
Closed

Attributes#1064
kashike wants to merge 1 commit intoSpongePowered:bleedingfrom
kashike:feature/attributes

Conversation

@kashike
Copy link
Contributor

@kashike kashike commented Dec 9, 2016

@kashike kashike added the status: wip Work in progress label Dec 9, 2016

import java.util.UUID;

@Implements(@Interface(iface = AttributeModifier.class, prefix = "modifier$"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this?


public static final AttributeOperation[] operations = new AttributeOperation[3];
@RegisterCatalog(AttributeOperations.class)
public final Map<String, AttributeOperation> operationMap = Maps.newHashMap();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guava suggests you to use constructor since java7.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our practice across the entire repo is to use guava, not changing now.


public class AttributeRegistryModule implements CatalogRegistryModule<AttributeType> {

private final Map<String, AttributeType> attributes = new HashMap<>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Deamon5550 Then why do you use constructor here if you always uses guava?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@gabizou gabizou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your intrinsic methods need to have prefixes with @Implements annotated on the mixing class.


@Intrinsic
@Override
default double getDefaultValue() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is intrinsic, it needs to be prefixed.


@Intrinsic
@Override
default String getName() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is intrinsic, needs to be prefixed.

@kashike kashike requested a review from Zidane as a code owner August 15, 2017 21:02
@ryantheleach
Copy link
Contributor

Kashike has some changes locally on this that need to be finished, If anyone picks this up, I'd recommend contacting them first to see what direction it was heading in.

@gabizou gabizou closed this Dec 2, 2019
@gabizou
Copy link
Member

gabizou commented Dec 2, 2019

This will need to be re-done and re-target api-8. Bleeding is no longer a valid branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: wip Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants